DATATYPE - tree item value typeITEMTYPE - tree item implementation typepublic interface ITreeItem<DATATYPE,ITEMTYPE extends ITreeItem<DATATYPE,ITEMTYPE>> extends IBasicTreeItem<DATATYPE,ITEMTYPE>
| Modifier and Type | Method and Description |
|---|---|
ITEMTYPE |
createChildItem(DATATYPE aData)
Add a child item to this item.
|
ITreeItemFactory<DATATYPE,ITEMTYPE> |
getFactory() |
com.helger.commons.state.EChange |
internalAddChild(ITEMTYPE aChild)
Add an existing child to this tree item.
|
com.helger.commons.state.EChange |
removeChild(ITEMTYPE aChild)
Remove the passed node as a child node from this node.
|
void |
reorderChildItems(Comparator<? super ITEMTYPE> aComparator)
Reorder the child items based on the item itself.
|
changeParent, getAllChildDatas, getData, getLevel, getParentData, isRootItem, isSameOrChildOf, setDatafindFirstChild, findFirstChildMapped, getAllChildren, getChildAtIndex, getFirstChild, getLastChildforAllChildrenRecursive, forAllChildrenRecursive@Nonnull ITreeItemFactory<DATATYPE,ITEMTYPE> getFactory()
@Nonnull com.helger.commons.state.EChange internalAddChild(@Nonnull ITEMTYPE aChild)
aChild - The child to be added. May not be null.EChange.UNCHANGED if the child is already contained,
EChange.CHANGED upon success.@Nonnull ITEMTYPE createChildItem(@Nullable DATATYPE aData)
aData - the data associated with this item@Nonnull com.helger.commons.state.EChange removeChild(@Nonnull ITEMTYPE aChild)
aChild - The child to be removed. May not be null.EChange.CHANGED if the removal succeeded,
EChange.UNCHANGED otherwisevoid reorderChildItems(@Nonnull Comparator<? super ITEMTYPE> aComparator)
aComparator - The comparator use. May not be null.Copyright © 2014–2021 Philip Helger. All rights reserved.