@Beta public class PathOperand extends Operand
Use ExpressionSpecBuilder.S(String)
,
ExpressionSpecBuilder.N(String)
, etc. to instantiate path operands to
refer to attributes of specific data types. You can also use
ExpressionSpecBuilder.attribute(String)
to instantiate a path operand
with an unspecified data type.
ExpressionSpecBuilder
Modifier and Type | Field and Description |
---|---|
private Path |
path |
private java.lang.String |
pathString |
Constructor and Description |
---|
PathOperand(java.lang.String path)
Constructs a path operand for building expressions.
|
Modifier and Type | Method and Description |
---|---|
(package private) java.lang.String |
asSubstituted(SubstitutionContext context)
Returns this unit of expression as a string substituted if necessary with
tokens using the given substitution context.
|
boolean |
equals(java.lang.Object o)
Returns true if the given object is a path operand with the same path as
that of the current path operand; false otherwise.
|
FunctionCondition |
exists()
Returns a function condition (that evaluates to true if the attribute referred
to by this path operand exists) for building condition expression.
|
(package private) java.lang.String |
getPath()
Returns the path of this path operand as a string.
|
int |
hashCode() |
FunctionCondition |
notExists()
Returns a function condition (that evaluates to true if the attribute referred
to by this path operand does not exist) for building condition
expression.
|
RemoveAction |
remove()
Returns a
RemoveAction for removing the attribute referred
to by this path operand from an item; used for building update
expression. |
java.lang.String |
toString() |
private final Path path
private final java.lang.String pathString
PathOperand(java.lang.String path)
path
- a document path in which nested elements are assumed to be
delimited by either "." or array indexing such as "[1]".java.lang.String asSubstituted(SubstitutionContext context)
UnitOfExpression
asSubstituted
in class UnitOfExpression
context
- the substitution context which may get mutated as a side
effect upon completion of this methodpublic final FunctionCondition exists()
public final FunctionCondition notExists()
public final RemoveAction remove()
RemoveAction
for removing the attribute referred
to by this path operand from an item; used for building update
expression.final java.lang.String getPath()
public final java.lang.String toString()
toString
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object
public final boolean equals(java.lang.Object o)
equals
in class java.lang.Object