@Immutable public final class ComparisonNode extends AbstractNode
| Constructor and Description |
|---|
ComparisonNode(ComparisonOperator operator,
String selector,
List<String> arguments) |
| 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(Object o) |
List<String> |
getArguments()
Returns a copy of the arguments list.
|
ComparisonOperator |
getOperator() |
String |
getSelector() |
int |
hashCode() |
String |
toString() |
ComparisonNode |
withArguments(List<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(String newSelector)
Returns a copy of this node with the specified selector.
|
acceptpublic ComparisonNode(ComparisonOperator operator, String selector, List<String> arguments)
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.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 String getSelector()
public ComparisonNode withSelector(String newSelector)
newSelector - Must not be null or blank.public List<String> getArguments()
multiValue, then it
contains exactly one argument.public ComparisonNode withArguments(List<String> newArguments)
newArguments - Must not be null or empty. If the operator is not
multiValue, then it must contain exactly
one argument.Copyright © 2011–2016. All rights reserved.