|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
java.lang.Object | +--com.sas.collection.AVLNode.Cursor
Cursor is an Enumeration for AVLNodes in an AVLTree. It works like an Enumeration but also provides backward enumeration.
| Constructor Summary | |
AVLNode.Cursor(AVLNode root,
boolean reversedOrder)
Construct an AVLNode cursor. |
|
| Method Summary | |
Object |
backwardElement()
Return the element in the backward direction. |
Object |
forwardElement()
Return the element in the forward direction. |
boolean |
hasBackwardElement()
Return true if there are more elements in the backward direction. |
boolean |
hasForwardElement()
Return true if there are more elements in the forward direction. |
boolean |
hasMoreElements()
Return true if this enumeration has more elements. |
Object |
nextElement()
Return the next element in this enumeration. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AVLNode.Cursor(AVLNode root,
boolean reversedOrder)
reversedOrder - if true, start at the rightmost
descendent and move backwards, else start
at the leftmost descendent and move forwards.| Method Detail |
public boolean hasMoreElements()
hasMoreElements in interface Enumerationpublic Object nextElement()
nextElement in interface EnumerationNoSuchElementException - if there are no more items.hasMoreElements()public boolean hasForwardElement()
public Object forwardElement()
public boolean hasBackwardElement()
public Object backwardElement()
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||