T
- the node typepublic interface ITreeProvider<T> extends IDetachable
IDetachable.detach()
method for cleaning up your ITreeProvider instance.IDetachable
,
AbstractTree
Modifier and Type | Method and Description |
---|---|
Iterator<? extends T> |
getChildren(T node)
Get the children of the given node.
|
Iterator<? extends T> |
getRoots()
Get the roots of the tree.
|
boolean |
hasChildren(T node)
Does the given object have children - note that this method may return
true even
if getChildren(Object) returns an empty iterator. |
IModel<T> |
model(T object)
Callback used by the consumer of this tree provider to wrap objects retrieved from
getRoots() or getChildren(Object) with a model (usually a detachable one). |
detach
boolean hasChildren(T node)
true
even
if getChildren(Object)
returns an empty iterator.node
- the node to check for childrentrue
if node has childrenIterator<? extends T> getChildren(T node)
node
- node to get children forIModel<T> model(T object)
getRoots()
or getChildren(Object)
with a model (usually a detachable one).
Important note: The model must implement Object.equals(Object)
and
Object.hashCode()
!
object
- the object that needs to be wrappedCopyright © 2006–2021 Apache Software Foundation. All rights reserved.