java.lang.Object
org.neo4j.cypherdsl.core.Labels
- All Implemented Interfaces:
Visitable
Represents label expressions, that can be in some way combined and may contain dynamic
expressions as described here.
Labels are essentially modelled as tree, so that they can be properly rendered.
We are using the term Labels here in accordance with GQL, in which a Label is a quality for both a node and a relationship element.
We are using the term Labels here in accordance with GQL, in which a Label is a quality for both a node and a relationship element.
- Since:
- 2025.1.0
- Author:
- Michael J. Simons
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAn enum describing whether aLabelsshould match all or any labels the expression resolves to.static enumType of this expression.static final recordThe content of this expression. -
Method Summary
Modifier and TypeMethodDescriptionCreate a conjunction.static LabelscolonConjunction(Collection<Labels.Value> values) Creates a colon conjunction of all values.conjunctionWith(Labels other) Creates a colon based conjunction.disjunctionWith(Labels other) getLhs()Returns the optional left hand side of this node.getRhs()Returns the optional right hand side of this node.Returns the list of all static labels.getType()getValue()booleanisEmpty()booleanReturns true if this is a negated expression.negate()Negates this expression.Create a disjunction.
-
Method Details
-
colonConjunction
Creates a colon conjunction of all values.- Parameters:
values- the values for the conjunction- Returns:
- a new labels expression
-
and
Create a conjunction.- Parameters:
next- the expression to add- Returns:
- a new expression
-
or
Create a disjunction.- Parameters:
next- the expression to add- Returns:
- a new expression
-
negate
Negates this expression.- Returns:
- a new expression
-
conjunctionWith
Creates a colon based conjunction.- Parameters:
other- the other labels to create a conjunction with- Returns:
- a new labels expression
-
disjunctionWith
-
getLhs
Returns the optional left hand side of this node.- Returns:
- the optional left hand side of this node
-
isNegated
public boolean isNegated()Returns true if this is a negated expression.- Returns:
- true if this is a negated expression
-
getRhs
Returns the optional right hand side of this node.- Returns:
- the optional right hand side of this node
-
getType
-
getValue
-
getStaticValues
Returns the list of all static labels.- Returns:
- the list of all static labels
-
isEmpty
public boolean isEmpty()
-