Class Navigation<T extends Selection>
java.lang.Object
org.odftoolkit.odfdom.incubator.search.Navigation<T>
- All Implemented Interfaces:
Iterator<T>
- Direct Known Subclasses:
TextNavigation
,TextStyleNavigation
Abstract class Navigation used to navigate the document and find the matched element by the user
defined conditions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract OdfElement
protected Node
getNextMatchElement
(Node startpoint) get the next matched element in a whole dom treeprotected Node
getNextMatchElementInTree
(Node startpoint, Node root) get the next matched element in a sub treeabstract boolean
hasNext()
Return true if document still has more matched Selection when traversing the document(In other words return true if next() would return an element instance rather than return null)abstract boolean
check if the element match the user defined conditionabstract T
next()
get the current Selection resultMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
Navigation
public Navigation()
-
-
Method Details
-
hasNext
public abstract boolean hasNext()Return true if document still has more matched Selection when traversing the document(In other words return true if next() would return an element instance rather than return null) -
getElement
-
next
get the current Selection result -
match
check if the element match the user defined condition- Parameters:
element
- navigate this element- Returns:
- true if the element match the user defined condition; false if not match
-
getNextMatchElement
get the next matched element in a whole dom tree- Parameters:
startpoint
- navigate from the startpoint- Returns:
- the next matched element
-
getNextMatchElementInTree
get the next matched element in a sub tree- Parameters:
startpoint
- navigate from the startpointroot
- the root of the sub tree- Returns:
- the next matched element
-