@Immutable public final class ComparisonNode extends AbstractNode
| Constructor and Description |
|---|
ComparisonNode(ComparisonOperator operator,
java.lang.String selector,
ComparisonArguments arguments) |
ComparisonNode(ComparisonOperator operator,
java.lang.String selector,
java.util.List<java.lang.String> arguments)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
<R,A> R |
accept(RSQLVisitor<R,A> visitor,
A param)
Accepts the visitor, calls its visit() method and returns a result.
|
boolean |
equals(java.lang.Object o) |
java.util.List<java.lang.String> |
getArguments()
Deprecated.
|
ComparisonArguments |
getArgumentsObject()
Return arguments.
|
ComparisonOperator |
getOperator() |
java.lang.String |
getSelector() |
int |
hashCode() |
java.lang.String |
toString() |
ComparisonNode |
withArguments(ComparisonArguments newArguments)
Returns a copy of this node with the specified arguments.
|
ComparisonNode |
withArguments(java.util.List<java.lang.String> newArguments)
Returns a copy of this node with the specified arguments.
|
ComparisonNode |
withOperator(ComparisonOperator newOperator)
Returns a copy of this node with the specified operator.
|
ComparisonNode |
withSelector(java.lang.String newSelector)
Returns a copy of this node with the specified selector.
|
accept, getNestingLevel, setNestingLevelpublic ComparisonNode(ComparisonOperator operator, java.lang.String selector, ComparisonArguments arguments)
operator - Must not be null.selector - Must not be null or blank.arguments - Must not be null or empty.java.lang.IllegalArgumentException - If one of the conditions specified above it not met.@Deprecated public ComparisonNode(ComparisonOperator operator, java.lang.String selector, java.util.List<java.lang.String> arguments)
ComparisonNode(ComparisonOperator, String, ComparisonArguments)operator - Must not be null.selector - Must not be null or blank.arguments - Must not be null or empty. If the operator is not
multiValue, then it must contain exactly
one argument.java.lang.IllegalArgumentException - If one of the conditions specified above it not met.public <R,A> R accept(RSQLVisitor<R,A> visitor, A param)
NodeEach implementation must implement this methods exactly as listed:
public <R, A> R accept(RSQLVisitor<R, A> visitor, A param) {
return visitor.visit(this, param);
}
R - Return type of the visitor's method.A - Type of an optional parameter passed to the visitor's method.visitor - The visitor whose appropriate method will be called.param - An optional parameter to pass to the visitor.public ComparisonOperator getOperator()
public ComparisonNode withOperator(ComparisonOperator newOperator)
newOperator - Must not be null.public java.lang.String getSelector()
public ComparisonNode withSelector(java.lang.String newSelector)
newSelector - Must not be null or blank.public ComparisonArguments getArgumentsObject()
multiValue, then it
contains exactly one argument.@Deprecated public java.util.List<java.lang.String> getArguments()
getArgumentsObject()multiValue, then it
contains exactly one argument.public ComparisonNode withArguments(ComparisonArguments newArguments)
newArguments - Must not be null or empty. If the operator is not
multiValue, then it must contain exactly
one argument.public ComparisonNode withArguments(java.util.List<java.lang.String> newArguments)
newArguments - Must not be null or empty. If the operator is not
multiValue, then it must contain exactly
one argument.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object