Class QueryVal<T>

  • Type Parameters:
    T - The type of the value in the fragment, which can be any object.

    public final class QueryVal<T>
    extends QueryFragment<T>
    Represents a value fragment of a Fauna query. This class encapsulates a value that can be a variable in the query, such as a literal value or a reference. The value can be any object type and will be substituted into the query at runtime.
    • Constructor Summary

      Constructors 
      Constructor Description
      QueryVal​(T value)
      Constructs a QueryVal with the specified value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Compares this QueryVal to another object for equality.
      T get()
      Retrieves the encapsulated value of this fragment.
      java.lang.Object getValue()
      Retrieves the value wrapped inside this fragment.
      int hashCode()
      Returns the hash code for this QueryVal.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QueryVal

        public QueryVal​(T value)
        Constructs a QueryVal with the specified value.
        Parameters:
        value - the value to encapsulate, which can be any object. It can represent a literal value or a reference to be used in the query.
    • Method Detail

      • get

        public T get()
        Retrieves the encapsulated value of this fragment.
        Specified by:
        get in class QueryFragment<T>
        Returns:
        the value contained within this fragment.
      • equals

        public boolean equals​(java.lang.Object o)
        Compares this QueryVal to another object for equality. Two QueryVal objects are considered equal if their encapsulated values are equal.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - the object to compare to.
        Returns:
        true if this QueryVal is equal to the other object, otherwise false.
      • hashCode

        public int hashCode()
        Returns the hash code for this QueryVal. The hash code is computed based on the encapsulated value.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hash code of this QueryVal.
      • getValue

        public java.lang.Object getValue()
        Retrieves the value wrapped inside this fragment.
        Returns:
        the value contained in the QueryVal fragment.