Module org.apache.wicket.extensions
Interface ITreeProvider<T>
- Type Parameters:
T- the node type
- All Superinterfaces:
org.apache.wicket.util.io.IClusterable,IDetachable,Serializable
- All Known Subinterfaces:
ISortableTreeProvider<T,S>
- All Known Implementing Classes:
SortableTreeProvider,TreeModelProvider
Provider of a tree.
You can use the
IDetachable.detach() method for cleaning up your ITreeProvider instance.- Author:
- svenmeier
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetChildren(T node) Get the children of the given node.getRoots()Get the roots of the tree.booleanhasChildren(T node) Does the given object have children - note that this method may returntrueeven ifgetChildren(Object)returns an empty iterator.Callback used by the consumer of this tree provider to wrap objects retrieved fromgetRoots()orgetChildren(Object)with a model (usually a detachable one).Methods inherited from interface org.apache.wicket.model.IDetachable
detach
-
Method Details
-
getRoots
Get the roots of the tree.- Returns:
- roots
-
hasChildren
Does the given object have children - note that this method may returntrueeven ifgetChildren(Object)returns an empty iterator.- Parameters:
node- the node to check for children- Returns:
trueif node has children
-
getChildren
Get the children of the given node.- Parameters:
node- node to get children for- Returns:
- children of node
-
model
Callback used by the consumer of this tree provider to wrap objects retrieved fromgetRoots()orgetChildren(Object)with a model (usually a detachable one).Important note: The model must implement
Object.equals(Object)andObject.hashCode()!- Parameters:
object- the object that needs to be wrapped- Returns:
- the model representation of the object
-