public class ComplexEntityExpression extends EntityExpression
ComplexEntityExpression connects two or more
EntityExpressions, i.e. they themselves can be
ComplexEntityExpressions too. How these sub expressions are
connected is determined by its type (getType()).
This class is used for the object-based representations of OrgPolicies created by the parser.
| Modifier and Type | Class and Description |
|---|---|
static class |
ComplexEntityExpression.Type
Enumerates the possible types of complex entity expressions.
|
| Constructor and Description |
|---|
ComplexEntityExpression(ComplexEntityExpression.Type type)
Constructs a new (and empty)
ComplexEntityExpression of the given
type. |
| Modifier and Type | Method and Description |
|---|---|
void |
addSubExpression(EntityExpression entExp)
Appends the given expression to this complex expression.
|
void |
format(java.lang.StringBuilder s)
Formats this object-based representation of an entity expression to a
(policy) string.
|
EntityExpression |
getSubExpressionAt(int index)
Returns the sub-expression at the given index.
|
int |
getSubExpressionCount()
Returns the number of sub-expressions contained in this complex entity
expression.
|
ComplexEntityExpression.Type |
getType()
Returns the type if this
ComplexEntityExpression. |
void |
replaceSubExpressionAt(int index,
EntityExpression entExp)
Replaces the sub-expression at the given index with the given expression.
|
formatpublic ComplexEntityExpression(ComplexEntityExpression.Type type)
ComplexEntityExpression of the given
type.type - the type of the complex entity expressionpublic ComplexEntityExpression.Type getType()
ComplexEntityExpression.ComplexEntityExpressionpublic int getSubExpressionCount()
public EntityExpression getSubExpressionAt(int index)
index - the index of the sub-expression to be returnedpublic void addSubExpression(EntityExpression entExp)
entExp - the (atomic or complex) expression to be appendedpublic void replaceSubExpressionAt(int index,
EntityExpression entExp)
Needed (internally) for path completion.
index - the index of the expression to be replacedentExp - the expression to replace the other onepublic void format(java.lang.StringBuilder s)
EntityExpressionStringBuilder.format in class EntityExpressions - the StringBuilder to which the result is appended