|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.util.LevelList
public class LevelList
A list that associates a level (instance of Integer
) with each element in the list.
Constructor Summary | |
---|---|
LevelList()
Creates a new list (initially empty). |
Method Summary | |
---|---|
void |
add(Object o)
Adds an element at level zero. |
void |
add(Object o,
int level)
Adds an element at a given level. |
void |
clear()
Clears the list. |
Object |
clone()
Clones the list. |
Object |
get(int index)
Returns the element with the given index. |
Object[] |
getElementArrayForLevel(int level)
Returns an iterator for all the elements at a given level. |
Object[] |
getElementArrayForLevel(int level,
Object[] target)
Returns an iterator for all the elements at a given level. |
int |
getElementCountForLevel(int level)
Returns the numer of elements registered for an certain level. |
int |
getLevel(int index)
Returns the level for an element. |
int |
getLevel(Object o)
Returns the level of an element. |
Iterator |
getLevelsAscending()
Returns an iterator that iterates through the levels in ascending order. |
Iterator |
getLevelsDescending()
Returns an iterator that iterates through the levels in descending order. |
Integer[] |
getLevelsDescendingArray()
Returns the levels of the elements in the list in descending order. |
int |
indexOf(Object o)
Returns the index of an element. |
void |
setLevel(int index,
int level)
Sets the level for an element. |
void |
setLevel(Object o,
int level)
Sets the level of an element. |
int |
size()
Returns the number of elements in the list. |
Object[] |
toArray()
Returns the elements as an array. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LevelList()
Method Detail |
---|
public int size()
public Iterator getLevelsAscending()
public Integer[] getLevelsDescendingArray()
public Iterator getLevelsDescending()
public Object[] toArray()
public Object[] getElementArrayForLevel(int level, Object[] target)
level
- the level.target
- the target array that should receive the contentes
public Object[] getElementArrayForLevel(int level)
level
- the level.
public int getElementCountForLevel(int level)
level
- the level that should be queried
public Object get(int index)
index
- the index.
public void add(Object o)
o
- the element.public void add(Object o, int level)
o
- the element.level
- the level.public void setLevel(int index, int level)
index
- the element index.level
- the level.public int getLevel(int index)
index
- the element index.
public int indexOf(Object o)
o
- the element.
public int getLevel(Object o)
o
- the element.
public void setLevel(Object o, int level)
o
- the element.level
- the level.public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
- should never happen.public void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |