public abstract class Navigation extends Object
Navigation is used to navigate the document and find the matched element by user
defined conditions.| Constructor and Description |
|---|
Navigation() |
| Modifier and Type | Method and Description |
|---|---|
protected Node |
getNextMatchElement(Node startpoint)
Get the next matched element in the whole element tree.
|
protected Node |
getNextMatchElementInTree(Node startpoint,
Node root)
Get the next matched element node in a sub tree
|
abstract boolean |
hasNext()
Return true if document still has more matched
Selection when traversing the
document(in other words return true if getNextMatchElement() would return an element instance
rather than return null) |
abstract boolean |
match(Node element)
Check if the element is a qualified one.
|
abstract Selection |
nextSelection()
Get next
Selection result. |
protected Document mDocument
public abstract boolean hasNext()
Selection when traversing the
document(in other words return true if getNextMatchElement() would return an element instance
rather than return null)public abstract Selection nextSelection()
Selection result.Selection resultpublic abstract boolean match(Node element)
Developers can define their own logic here to determine whether an element satisfies the requirements.
element - navigate this element node.protected Node getNextMatchElement(Node startpoint)
startpoint - navigate from the start pointCopyright © 2010–2018 Apache Software Foundation; Copyright © 2018–2020 The Document Foundation. All rights reserved.