Class QueryLiteral


  • public final class QueryLiteral
    extends QueryFragment
    Represents a literal fragment of a Fauna query. This class encapsulates a fixed string that does not contain any variables. A QueryLiteral is used to represent literal values in a query.
    • Constructor Summary

      Constructors 
      Constructor Description
      QueryLiteral​(java.lang.String value)
      Constructs a new QueryLiteral with the given literal value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.String get()
      Retrieves the string value of this literal fragment.
      java.lang.String getValue()
      Gets the wrapped literal value.
      int hashCode()  
      • Methods inherited from class java.lang.Object

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

      • QueryLiteral

        public QueryLiteral​(java.lang.String value)
        Constructs a new QueryLiteral with the given literal value.
        Parameters:
        value - the string value of this fragment; must not be null.
        Throws:
        java.lang.IllegalArgumentException - if value is null.
    • Method Detail

      • get

        public java.lang.String get()
        Retrieves the string value of this literal fragment.
        Specified by:
        get in class QueryFragment
        Returns:
        the string value of this fragment.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getValue

        public java.lang.String getValue()
        Gets the wrapped literal value.
        Returns:
        The literal value as a string.