T - public class SelectPropExpression<T> extends java.lang.Object implements PropExpression<T>, java.lang.Iterable<PropExpression<T>>
allowAny() method returns true then all expressions are
equivalent and a later expression in the list can be used if necessary.
Otherwise each expression must be evaluated in turn until one
returns a non-null value. In this case it is not acceptable to skip an expression
that might be evaluated| Constructor and Description |
|---|
SelectPropExpression(boolean use_any,
java.lang.Class<? super T> target,
PropExpression<T>[] alts) |
SelectPropExpression(java.lang.Class<? super T> target,
PropExpression<T>[] alts) |
| Modifier and Type | Method and Description |
|---|---|
<R> R |
accept(BasePropExpressionVisitor<R> vis)
Visitor pattern.
|
boolean |
allowAny() |
SelectPropExpression<T> |
copy()
Generate an equivalent (and where possible immutable) copy of
this expression.
|
boolean |
equals(java.lang.Object obj) |
PropExpression<T> |
get(int i) |
java.lang.Class<? super T> |
getTarget() |
int |
hashCode() |
java.util.Iterator<PropExpression<T>> |
iterator() |
int |
length() |
static SelectPropExpression |
makeSelect(PropExpression[] e)
Utility class to generate SelectPropExpression with
a sensible target type.
|
java.lang.String |
toString() |
public SelectPropExpression(java.lang.Class<? super T> target, PropExpression<T>[] alts)
public SelectPropExpression(boolean use_any,
java.lang.Class<? super T> target,
PropExpression<T>[] alts)
public boolean allowAny()
public int length()
public PropExpression<T> get(int i)
public <R> R accept(BasePropExpressionVisitor<R> vis) throws java.lang.Exception
PropExpressionBasePropExpressionVisitor visit this expressionaccept in interface PropExpression<T>java.lang.ExceptionR - type of returnvis - visitorpublic java.lang.Class<? super T> getTarget()
getTarget in interface uk.ac.ed.epcc.webapp.Targetted<T>public java.lang.String toString()
toString in class java.lang.Objectpublic static SelectPropExpression makeSelect(PropExpression[] e)
e - public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic SelectPropExpression<T> copy()
PropExpressioncopy in interface PropExpression<T>public java.util.Iterator<PropExpression<T>> iterator()
iterator in interface java.lang.Iterable<PropExpression<T>>