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() |
EChange |
internalAddChild(ITEMTYPE aChild)
Add an existing child to this tree item.
|
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, setDatagetParentgetAllChildren, getChildAtIndex, getFirstChild, getLastChildgetChildCount, hasChildren, hasNoChildrenthisAsT@Nonnull ITreeItemFactory<DATATYPE,ITEMTYPE> getFactory()
@Nonnull 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 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–2016 Philip Helger. All rights reserved.