Interface Literal<T>

Type Parameters:
T - type of content
All Superinterfaces:
Expression, Visitable
All Known Implementing Classes:
Asterisk, BooleanLiteral, ListLiteral, MapLiteral, NullLiteral, NumberLiteral, StringLiteral, TemporalLiteral

@API(status=STABLE, since="1.0") public interface Literal<T> extends Expression
Represents a literal with an optional content.
Since:
1.0
Author:
Michael J. Simons
  • Method Details

    • asString

      @NotNull @Contract(pure=true) @NotNull String asString()
      The string representation should be designed in such a way the a renderer can use it correctly in the given context of the literal, i.e. a literal containing a string should quote that string and escape all reserved characters.
      Returns:
      A string representation to be used literally in a cypher statement.
    • getContent

      default T getContent()
      Retrieves the actual content of this literal, might not be supported by all literals.
      Returns:
      the actual content of this literal
      Since:
      2023.4.0