DATATYPE - Data type of the items.ITEMTYPE - tree item typepublic interface IBasicTreeItem<DATATYPE,ITEMTYPE extends IBasicTreeItem<DATATYPE,ITEMTYPE>> extends IHasParent<ITEMTYPE>, IHasChildrenSorted<ITEMTYPE>
| Modifier and Type | Method and Description |
|---|---|
ESuccess |
changeParent(ITEMTYPE aNewParent)
Change the parent node of this node to another node (subordination).
|
Collection<DATATYPE> |
getAllChildDatas()
Get the data values of all contained children.
|
DATATYPE |
getData() |
DATATYPE |
getParentData() |
boolean |
isRootItem() |
boolean |
isSameOrChildOf(ITEMTYPE aParent)
Check if this item is the same or a child of the passed item.
|
void |
setData(DATATYPE aData)
Change the data associated with this node.
|
getParentgetChildAtIndex, getChildren, getFirstChild, getLastChildgetChildCount, hasChildren@Nullable DATATYPE getParentData()
null.@Nullable Collection<DATATYPE> getAllChildDatas()
null if this item does not have children. Use
IHasChildren.hasChildren() to check for the existence.void setData(@Nullable DATATYPE aData)
aData - The data associated with this node. May be null.IllegalArgumentException - If the data is not valid (depending on any custom validator).boolean isRootItem()
true if this is the internal root item without a
parent, false if this is a public item.boolean isSameOrChildOf(@Nonnull ITEMTYPE aParent)
aParent - The parent item to check whether this is a child of it. May not be
null.true if this is the same or a child of
aParent.Copyright © 2006–2015 phloc systems. All rights reserved.