DATATYPE - tree item value typeITEMTYPE - tree item implementation type@NotThreadSafe public class BasicTree<DATATYPE,ITEMTYPE extends ITreeItem<DATATYPE,ITEMTYPE>> extends Object implements ITree<DATATYPE,ITEMTYPE>
| Constructor and Description |
|---|
BasicTree(ITreeItemFactory<DATATYPE,ITEMTYPE> aFactory) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Collection<? extends ITEMTYPE> |
getAllChildren() |
int |
getChildCount() |
ITEMTYPE |
getRootItem() |
boolean |
hasChildren() |
int |
hashCode() |
String |
toString() |
public BasicTree(@Nonnull ITreeItemFactory<DATATYPE,ITEMTYPE> aFactory)
public final boolean hasChildren()
hasChildren in interface IHasChildren<ITEMTYPE extends ITreeItem<DATATYPE,ITEMTYPE>>true if this item has direct children,
false otherwise.@Nonnegative public int getChildCount()
getChildCount in interface IHasChildren<ITEMTYPE extends ITreeItem<DATATYPE,ITEMTYPE>>@Nonnull @ReturnsMutableCopy public final Collection<? extends ITEMTYPE> getAllChildren()
getAllChildren in interface IHasChildren<ITEMTYPE extends ITreeItem<DATATYPE,ITEMTYPE>>null
.@Nonnull public final ITEMTYPE getRootItem()
getRootItem in interface IBasicTree<DATATYPE,ITEMTYPE extends ITreeItem<DATATYPE,ITEMTYPE>>null. The root item
should not be displayed but it is the parent node of all displayed
root items and therefore cannot be removed.Copyright © 2014–2016 Philip Helger. All rights reserved.