Package org.neo4j.cypherdsl.core
Class Literal<T>
- java.lang.Object
-
- org.neo4j.cypherdsl.core.Literal<T>
-
- Type Parameters:
T- type of content
- All Implemented Interfaces:
Expression,Visitable
- Direct Known Subclasses:
Asterisk,BooleanLiteral,ListLiteral,Namespace,NullLiteral,NumberLiteral,StringLiteral
@API(status=EXPERIMENTAL, since="1.0") public abstract class Literal<T> extends java.lang.Object implements ExpressionRepresents a literal with an optional content.- Since:
- 1.0
- Author:
- Michael J. Simons
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.StringasString()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.TgetContent()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.neo4j.cypherdsl.core.Expression
add, as, ascending, concat, contains, descending, divide, endsWith, gt, gte, in, isEmpty, isEqualTo, isFalse, isNotEqualTo, isNotNull, isNull, isTrue, lt, lte, matches, matches, multiply, pow, property, remainder, startsWith, subtract
-
-
-
-
Method Detail
-
getContent
public T getContent()
- Returns:
- The content of this literal, may be null
-
asString
public abstract java.lang.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.
-
-