org.pentaho.util.collections
Class HeirarchicalLinkedListItem

java.lang.Object
  extended by org.pentaho.util.collections.HeirarchicalLinkedListItem
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ChartElement

public class HeirarchicalLinkedListItem
extends Object
implements Cloneable


Constructor Summary
HeirarchicalLinkedListItem()
           
 
Method Summary
 Object clone()
          Clones this object.
 int getChildCount()
          Returns the number of direct children the current element contains
 HeirarchicalLinkedListItem getFirstChildItem()
          Returns ths first child of this item.
 HeirarchicalLinkedListItem getLastChildItem()
          Returns the last child of this item.
 long getModNumber()
          Returns the modification number for this item.
 HeirarchicalLinkedListItem getNextDepthFirstItem()
          Returns the next element in the heirarchical linked list based on a depth-first iteration
 HeirarchicalLinkedListItem getNextItem()
          Returns the item that is after this item at the same level of heirarchy.
 HeirarchicalLinkedListItem getParentItem()
          Returns the parent item of this item.
 HeirarchicalLinkedListItem getPreviousItem()
          Returns the item that is before this item at the same level of heirarchy.
 void removeItem()
          Removes this item from the heirarchy.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeirarchicalLinkedListItem

public HeirarchicalLinkedListItem()
Method Detail

getModNumber

public long getModNumber()
Returns the modification number for this item. This number can be used to determine if a cache is invalid by comparing this number to the value when the cache was last updated. If the number is different, it will indicate if this item or any of it's children have been modified.


getParentItem

public HeirarchicalLinkedListItem getParentItem()
Returns the parent item of this item. It will return null if this item has no parent.


getPreviousItem

public HeirarchicalLinkedListItem getPreviousItem()
Returns the item that is before this item at the same level of heirarchy. If this item is the first item at this level in the heirarchy, this method will return null.


getNextItem

public HeirarchicalLinkedListItem getNextItem()
Returns the item that is after this item at the same level of heirarchy. If this item is the last item at this level in the heirarchy, this method will return null.


getFirstChildItem

public HeirarchicalLinkedListItem getFirstChildItem()
Returns ths first child of this item. If this item has no children, this method will return null.


getLastChildItem

public HeirarchicalLinkedListItem getLastChildItem()
Returns the last child of this item. If this item has no children, this method will return null.


removeItem

public void removeItem()
Removes this item from the heirarchy.


getChildCount

public int getChildCount()
Returns the number of direct children the current element contains

Returns:
the number of direct children the current element contains

getNextDepthFirstItem

public HeirarchicalLinkedListItem getNextDepthFirstItem()
Returns the next element in the heirarchical linked list based on a depth-first iteration

Returns:
the next depth-first item in the list, or null if this is the last item.

clone

public Object clone()
             throws CloneNotSupportedException
Clones this object. This class does not allow cloning of the data, so it will throw a CloneNotSupportedException.

Overrides:
clone in class Object
Throws:
CloneNotSupportedException