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) |
void |
forAllChildren(Consumer<? super ITEMTYPE> aConsumer) |
void |
forAllChildren(Predicate<? super ITEMTYPE> aFilter,
Consumer<? super ITEMTYPE> aConsumer) |
com.helger.commons.state.EContinue |
forAllChildrenBreakable(Function<? super ITEMTYPE,com.helger.commons.state.EContinue> aConsumer) |
<DSTTYPE> void |
forAllChildrenMapped(Predicate<? super ITEMTYPE> aFilter,
Function<? super ITEMTYPE,? extends DSTTYPE> aMapper,
Consumer<? super DSTTYPE> aConsumer) |
com.helger.commons.collection.impl.ICommonsCollection<ITEMTYPE> |
getAllChildren() |
int |
getChildCount() |
com.helger.commons.collection.impl.ICommonsIterable<ITEMTYPE> |
getChildren() |
ITEMTYPE |
getRootItem() |
boolean |
hasChildren() |
int |
hashCode() |
String |
toString() |
public BasicTreeWithID(@Nonnull ITreeItemWithIDFactory<KEYTYPE,DATATYPE,ITEMTYPE> aFactory)
public final boolean hasChildren()
hasChildren in interface com.helger.commons.hierarchy.IHasChildren<ITEMTYPE extends ITreeItemWithID<KEYTYPE,DATATYPE,ITEMTYPE>>@Nonnegative public final int getChildCount()
getChildCount in interface com.helger.commons.hierarchy.IHasChildren<ITEMTYPE extends ITreeItemWithID<KEYTYPE,DATATYPE,ITEMTYPE>>@Nonnull @ReturnsMutableCopy public final com.helger.commons.collection.impl.ICommonsCollection<ITEMTYPE> getAllChildren()
getAllChildren in interface com.helger.commons.hierarchy.IHasChildren<ITEMTYPE extends ITreeItemWithID<KEYTYPE,DATATYPE,ITEMTYPE>>@Nonnull public final com.helger.commons.collection.impl.ICommonsIterable<ITEMTYPE> getChildren()
getChildren in interface com.helger.commons.hierarchy.IHasChildren<ITEMTYPE extends ITreeItemWithID<KEYTYPE,DATATYPE,ITEMTYPE>>public final void forAllChildren(@Nonnull Consumer<? super ITEMTYPE> aConsumer)
forAllChildren in interface com.helger.commons.hierarchy.IHasChildren<ITEMTYPE extends ITreeItemWithID<KEYTYPE,DATATYPE,ITEMTYPE>>@Nonnull public final com.helger.commons.state.EContinue forAllChildrenBreakable(@Nonnull Function<? super ITEMTYPE,com.helger.commons.state.EContinue> aConsumer)
forAllChildrenBreakable in interface com.helger.commons.hierarchy.IHasChildren<ITEMTYPE extends ITreeItemWithID<KEYTYPE,DATATYPE,ITEMTYPE>>public final void forAllChildren(@Nonnull Predicate<? super ITEMTYPE> aFilter, @Nonnull Consumer<? super ITEMTYPE> aConsumer)
forAllChildren in interface com.helger.commons.hierarchy.IHasChildren<ITEMTYPE extends ITreeItemWithID<KEYTYPE,DATATYPE,ITEMTYPE>>public final <DSTTYPE> void forAllChildrenMapped(@Nonnull Predicate<? super ITEMTYPE> aFilter, @Nonnull Function<? super ITEMTYPE,? extends DSTTYPE> aMapper, @Nonnull Consumer<? super DSTTYPE> aConsumer)
forAllChildrenMapped in interface com.helger.commons.hierarchy.IHasChildren<ITEMTYPE extends ITreeItemWithID<KEYTYPE,DATATYPE,ITEMTYPE>>@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–2021 Philip Helger. All rights reserved.