KEYTYPE - tree item key typeDATATYPE - tree item value typeITEMTYPE - tree item implementation type@NotThreadSafe public class BasicTreeWithID<KEYTYPE,DATATYPE,ITEMTYPE extends ITreeItemWithID<KEYTYPE,DATATYPE,ITEMTYPE>> extends Object implements ITreeWithID<KEYTYPE,DATATYPE,ITEMTYPE>
| Constructor and Description |
|---|
BasicTreeWithID(ITreeItemWithIDFactory<KEYTYPE,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 BasicTreeWithID(@Nonnull ITreeItemWithIDFactory<KEYTYPE,DATATYPE,ITEMTYPE> aFactory)
public final boolean hasChildren()
hasChildren in interface IHasChildren<ITEMTYPE extends ITreeItemWithID<KEYTYPE,DATATYPE,ITEMTYPE>>true if this item has direct children,
false otherwise.@Nonnegative public int getChildCount()
getChildCount in interface IHasChildren<ITEMTYPE extends ITreeItemWithID<KEYTYPE,DATATYPE,ITEMTYPE>>@Nonnull @ReturnsMutableCopy public final Collection<? extends ITEMTYPE> getAllChildren()
getAllChildren in interface IHasChildren<ITEMTYPE extends ITreeItemWithID<KEYTYPE,DATATYPE,ITEMTYPE>>null
.@Nonnull public final ITEMTYPE getRootItem()
getRootItem in interface IBasicTree<DATATYPE,ITEMTYPE extends ITreeItemWithID<KEYTYPE,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.