|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.miv.pherd.ntree.util.NTreeLevels
public class NTreeLevels
Levels in a NTree.
The levels represent sets of cells that are all at a given depth. They are
automatically updated when you use the CellLevelData class as data
for the cells of your tree.
When you use the CellLevelData as data of your cells, they automatically
maintain the cell level in an instance of this class. This instance can then
be queried to browse cells by levels.
| Field Summary | |
|---|---|
protected ArrayList<HashSet<Cell>> |
levels
The levels. |
| Constructor Summary | |
|---|---|
NTreeLevels()
|
|
| Method Summary | |
|---|---|
protected void |
check(Cell cell)
Called by a CellLevelData instance to check it is correctly registered in its level. |
Set<? extends Cell> |
getLevel(int i)
Set of cells of the i-th level. |
int |
getLevelCount()
The number of levels in the tree (equals to the depth of the tree). |
protected void |
trim()
Remove empty levels at the top of the level stack. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ArrayList<HashSet<Cell>> levels
| Constructor Detail |
|---|
public NTreeLevels()
| Method Detail |
|---|
public int getLevelCount()
public Set<? extends Cell> getLevel(int i)
i - The level.
protected void trim()
protected void check(Cell cell)
cell - The cell to check.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||