public abstract class GroupingExpression extends GroupingNode
GroupingOperation
. You may manually construct this expression, or
you may use the GroupingParser
to generate one from a query-string.Modifier | Constructor and Description |
---|---|
protected |
GroupingExpression(String image) |
Modifier and Type | Method and Description |
---|---|
static String |
asImage(Object obj)
Returns a string representation of an object that can be used in the 'image' constructor argument of
GroupingNode . |
static String |
asString(List<GroupingExpression> lst)
Returns a string description of the given list of expressions.
|
int |
getLevel()
Returns the conceptual level of this expression.
|
void |
resolveLevel(int level)
Resolves the conceptual level of this expression.
|
GroupingExpression |
setLabel(String label)
Assigns a label to this grouping expression.
|
void |
visit(ExpressionVisitor visitor)
Recursively calls
ExpressionVisitor.visitExpression(GroupingExpression) for this expression and all of
its argument expressions. |
getLabel, toString
private Integer level
protected GroupingExpression(String image)
public void resolveLevel(int level)
level
- The level of the input data.IllegalArgumentException
- Thrown if the level of this expression could not be resolved.IllegalStateException
- Thrown if type failed to accept the number of arguments provided.public int getLevel()
IllegalArgumentException
- Thrown if the level of this expression has not been resolved.resolveLevel(int)
public void visit(ExpressionVisitor visitor)
ExpressionVisitor.visitExpression(GroupingExpression)
for this expression and all of
its argument expressions.visitor
- The visitor to call.public static String asString(List<GroupingExpression> lst)
GroupingNode.toString()
output.lst
- The list of expressions to output.public static String asImage(Object obj)
GroupingNode
. This method ensures that strings are quoted, and that all complex characters are escaped.obj
- The object to output.public GroupingExpression setLabel(String label)
GroupingNode
setLabel
in class GroupingNode
label
- The label to assign to this.Copyright © 2018. All rights reserved.