|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.function.ExpressionCollection
public class ExpressionCollection
Collects all expressions used in the report. Unlike earlier versions of this class, now expressions can have a null-name and more than one expression with the same name can exist in the collection. Expressions without a name will not appear in the datarow and expressions with duplicate names will only appear once (the last expression added will appear, according to the rules of duplicate entries in the datarow)
Constructor Summary | |
---|---|
ExpressionCollection()
Creates a new expression collection (initially empty). |
|
ExpressionCollection(Collection expressions)
Creates a new expression collection, populated with the supplied expressions. |
Method Summary | |
---|---|
void |
add(Expression e)
Adds an expression to the collection. |
void |
add(int index,
Expression e)
|
void |
addAll(Collection expressions)
Adds all expressions contained in the given collection to this expression collection. |
Object |
clone()
Clones this expression collection and all expressions contained in the collection. |
boolean |
contains(Expression expression)
|
Expression |
get(String name)
Returns the Expression with the specified name (or null ). |
Expression |
getExpression(int pos)
Returns the expression on the given position in the list. |
Expression[] |
getExpressions()
Return all expressions contained in this collection as array. |
int |
indexOf(Expression element)
|
boolean |
removeExpression(Expression e)
Removes an expression from the collection. |
void |
removeExpression(int index)
Removes an expression from the collection. |
Expression |
set(int index,
Expression element)
|
int |
size()
Returns the number of active expressions in this collection. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExpressionCollection()
public ExpressionCollection(Collection expressions)
expressions
- a collection of expressions.
ClassCastException
- if the collection does not contain ExpressionsMethod Detail |
---|
public void addAll(Collection expressions)
expressions
- the expressions to be added.
ClassCastException
- if the collection does not contain expressionspublic Expression get(String name)
Expression
with the specified name (or null
).
name
- the expression name (null
not permitted).
public void add(Expression e)
e
- the expression.public void add(int index, Expression e)
public boolean removeExpression(Expression e)
e
- the expression.
NullPointerException
- if the given Expression is null.public void removeExpression(int index)
index
- the index of the expression ro removepublic int size()
public Expression getExpression(int pos)
pos
- the position in the list.
IndexOutOfBoundsException
- if the given position is invalidpublic int indexOf(Expression element)
public Expression set(int index, Expression element)
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
- should never happen.public Expression[] getExpressions()
public boolean contains(Expression expression)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |