|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.omnaest.utils.structure.hierarchy.TokenMonoHierarchy.Navigator
public class TokenMonoHierarchy.Navigator
The TokenMonoHierarchy.Navigator allows to navigate on a given TokenMonoHierarchy
| Field Summary | |
|---|---|
protected boolean |
navigationSuccessful
|
protected TokenMonoHierarchy.TokenElementNode |
tokenElementNode
|
| Constructor Summary | |
|---|---|
protected |
TokenMonoHierarchy.Navigator(TokenMonoHierarchy.TokenElementNode tokenElementNode)
|
| Method Summary | |
|---|---|
protected TokenMonoHierarchy.Navigator |
addValuesToCurrentNode(V... values)
Adds values to the current node |
protected TokenMonoHierarchy.TokenElementNode |
determineSiblingTokenElementNode(int relativeIndexPosition)
|
List<E> |
determineTokenPathElementList()
Determines the List of token path elements which represents the current hierarchy path. |
E |
getTokenElement()
Returns the current token element |
List<E> |
getTokenElementOfChildrenList()
Returns a List with all token elements of the children. |
List<V> |
getValues()
Returns the values of the current node |
boolean |
hasChildren()
Returns true if the current node has children |
boolean |
hasNextSibling()
Returns true if the current node has a next sibling |
boolean |
hasParent()
Returns true if the current node has a parent |
boolean |
hasPreviousSibling()
Returns true if the current node has a previous sibling |
boolean |
hasSibling(int relativeIndexPosition)
Returns true if the current node has a sibling a the given relative index position. |
boolean |
hasValues()
Returns true if the current node has at least one value |
boolean |
isNavigationSuccessful()
Returns true if the last navigation was successful. |
TokenMonoHierarchy.Navigator |
navigateToChild(E tokenElement)
Navigates the current TokenMonoHierarchy.Navigator to the given child token element. |
protected TokenMonoHierarchy.Navigator |
navigateToChildAndCreateItIfNotExisting(E tokenElement)
Navigates the current TokenMonoHierarchy.Navigator to the given child token element. |
TokenMonoHierarchy.Navigator |
navigateToFirstChild()
Navigates the current TokenMonoHierarchy.Navigator to the first child token element. |
TokenMonoHierarchy.Navigator |
navigateToNextNodeWithValues()
Navigates to the next node which hasValues(). |
TokenMonoHierarchy.Navigator |
navigateToNextSibling()
Navigates to the next sibling |
TokenMonoHierarchy.Navigator |
navigateToParent()
Navigates the current TokenMonoHierarchy.Navigator to its parent |
TokenMonoHierarchy.Navigator |
navigateToPreviousSibling()
Navigates to the previous sibling |
TokenMonoHierarchy.Navigator |
navigateToSibling(int relativeIndexPosition)
Navigates to a relative position within the siblings. |
TokenMonoHierarchy.Navigator |
newNavigatorFork()
Returns a new TokenMonoHierarchy.Navigator instance based on the current navigation position. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected TokenMonoHierarchy.TokenElementNode tokenElementNode
protected boolean navigationSuccessful
| Constructor Detail |
|---|
protected TokenMonoHierarchy.Navigator(TokenMonoHierarchy.TokenElementNode tokenElementNode)
tokenElementNode - TokenMonoHierarchy.Navigator| Method Detail |
|---|
public TokenMonoHierarchy.Navigator newNavigatorFork()
TokenMonoHierarchy.Navigator instance based on the current navigation position. This new TokenMonoHierarchy.Navigator will not
affect the current TokenMonoHierarchy.Navigator instance.
public E getTokenElement()
public List<E> getTokenElementOfChildrenList()
List with all token elements of the children.
public List<E> determineTokenPathElementList()
List of token path elements which represents the current hierarchy path.
public boolean hasValues()
public TokenMonoHierarchy.Navigator navigateToNextNodeWithValues()
hasValues(). The navigation occurs at first through all children and their
children and then to the next siblings until the whole hierarchy is traversed.
isNavigationSuccessful()public TokenMonoHierarchy.Navigator navigateToNextSibling()
public TokenMonoHierarchy.Navigator navigateToPreviousSibling()
public TokenMonoHierarchy.Navigator navigateToSibling(int relativeIndexPosition)
relativeIndexPosition -
public boolean hasNextSibling()
public boolean hasPreviousSibling()
public boolean hasSibling(int relativeIndexPosition)
relativeIndexPosition -
protected TokenMonoHierarchy.TokenElementNode determineSiblingTokenElementNode(int relativeIndexPosition)
relativeIndexPosition -
public boolean hasChildren()
public boolean hasParent()
protected TokenMonoHierarchy.Navigator navigateToChildAndCreateItIfNotExisting(E tokenElement)
TokenMonoHierarchy.Navigator to the given child token element. If no child token element exists it will be
created before.
tokenElement -
public TokenMonoHierarchy.Navigator navigateToChild(E tokenElement)
TokenMonoHierarchy.Navigator to the given child token element.
tokenElement -
public TokenMonoHierarchy.Navigator navigateToFirstChild()
TokenMonoHierarchy.Navigator to the first child token element.
tokenElement -
protected TokenMonoHierarchy.Navigator addValuesToCurrentNode(V... values)
values -
public List<V> getValues()
public TokenMonoHierarchy.Navigator navigateToParent()
TokenMonoHierarchy.Navigator to its parent
public boolean isNavigationSuccessful()
navigateToChild(Object),
navigateToParent()public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||