KEYTYPE - Tree key typeVALUETYPE - Tree value typepublic interface ITreeWithUniqueIDProxy<KEYTYPE,VALUETYPE> extends ITreeWithGlobalUniqueID<KEYTYPE,VALUETYPE,DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>
ITreeWithGlobalUniqueID.| Modifier and Type | Method and Description |
|---|---|
default boolean |
containsItemWithID(KEYTYPE aDataID)
Check if a tree item corresponding to the given ID is present.
|
default void |
forAllChildren(Consumer<? super DefaultTreeItemWithID<KEYTYPE,VALUETYPE>> aConsumer) |
default void |
forAllChildren(Predicate<? super DefaultTreeItemWithID<KEYTYPE,VALUETYPE>> aFilter,
Consumer<? super DefaultTreeItemWithID<KEYTYPE,VALUETYPE>> aConsumer) |
default <DSTTYPE> void |
forAllChildrenMapped(Predicate<? super DefaultTreeItemWithID<KEYTYPE,VALUETYPE>> aFilter,
Function<? super DefaultTreeItemWithID<KEYTYPE,VALUETYPE>,? extends DSTTYPE> aMapper,
Consumer<? super DSTTYPE> aConsumer) |
default com.helger.commons.collection.impl.ICommonsCollection<DefaultTreeItemWithID<KEYTYPE,VALUETYPE>> |
getAllChildren() |
default com.helger.commons.collection.impl.ICommonsCollection<? extends DefaultTreeItemWithID<KEYTYPE,VALUETYPE>> |
getAllChildren(DefaultTreeItemWithID<KEYTYPE,VALUETYPE> aCurrent) |
default com.helger.commons.collection.impl.ICommonsCollection<VALUETYPE> |
getAllItemDatas() |
default com.helger.commons.collection.impl.ICommonsCollection<DefaultTreeItemWithID<KEYTYPE,VALUETYPE>> |
getAllItems() |
default int |
getChildCount() |
default int |
getChildCount(DefaultTreeItemWithID<KEYTYPE,VALUETYPE> aCurrent) |
default com.helger.commons.collection.impl.ICommonsIterable<DefaultTreeItemWithID<KEYTYPE,VALUETYPE>> |
getChildren() |
default DefaultTreeItemWithID<KEYTYPE,VALUETYPE> |
getChildWithID(DefaultTreeItemWithID<KEYTYPE,VALUETYPE> aCurrent,
KEYTYPE aID) |
default int |
getItemCount() |
default VALUETYPE |
getItemDataWithID(KEYTYPE aDataID)
Get the data of the tree item that corresponds to the given ID.
|
default DefaultTreeItemWithID<KEYTYPE,VALUETYPE> |
getItemWithID(KEYTYPE aDataID)
Get the
ITreeItemWithID that corresponds to the given ID. |
DefaultTreeWithGlobalUniqueID<KEYTYPE,VALUETYPE> |
getProxyTree() |
default DefaultTreeItemWithID<KEYTYPE,VALUETYPE> |
getRootItem() |
default boolean |
hasChildren() |
default boolean |
hasChildren(DefaultTreeItemWithID<KEYTYPE,VALUETYPE> aCurrent) |
default boolean |
hasNoChildren() |
default boolean |
hasNoChildren(DefaultTreeItemWithID<KEYTYPE,VALUETYPE> aCurrent) |
default boolean |
isItemSameOrDescendant(KEYTYPE aParentItemID,
KEYTYPE aChildItemID)
Check if one item is equal or a child of the other item.
|
default com.helger.commons.state.EChange |
removeItemWithID(KEYTYPE aDataID)
Remove the item with the specified ID
|
@Nonnull DefaultTreeWithGlobalUniqueID<KEYTYPE,VALUETYPE> getProxyTree()
default boolean hasChildren()
hasChildren in interface com.helger.commons.hierarchy.IHasChildren<DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>default boolean hasNoChildren()
hasNoChildren in interface com.helger.commons.hierarchy.IHasChildren<DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>@Nonnegative default int getChildCount()
getChildCount in interface com.helger.commons.hierarchy.IHasChildren<DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>@Nonnull @ReturnsMutableCopy default com.helger.commons.collection.impl.ICommonsCollection<DefaultTreeItemWithID<KEYTYPE,VALUETYPE>> getAllChildren()
getAllChildren in interface com.helger.commons.hierarchy.IHasChildren<DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>@Nullable default com.helger.commons.collection.impl.ICommonsIterable<DefaultTreeItemWithID<KEYTYPE,VALUETYPE>> getChildren()
getChildren in interface com.helger.commons.hierarchy.IHasChildren<DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>default void forAllChildren(@Nonnull Consumer<? super DefaultTreeItemWithID<KEYTYPE,VALUETYPE>> aConsumer)
forAllChildren in interface com.helger.commons.hierarchy.IHasChildren<DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>default void forAllChildren(@Nonnull Predicate<? super DefaultTreeItemWithID<KEYTYPE,VALUETYPE>> aFilter, @Nonnull Consumer<? super DefaultTreeItemWithID<KEYTYPE,VALUETYPE>> aConsumer)
forAllChildren in interface com.helger.commons.hierarchy.IHasChildren<DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>default <DSTTYPE> void forAllChildrenMapped(@Nonnull Predicate<? super DefaultTreeItemWithID<KEYTYPE,VALUETYPE>> aFilter, @Nonnull Function<? super DefaultTreeItemWithID<KEYTYPE,VALUETYPE>,? extends DSTTYPE> aMapper, @Nonnull Consumer<? super DSTTYPE> aConsumer)
forAllChildrenMapped in interface com.helger.commons.hierarchy.IHasChildren<DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>@Nonnull default DefaultTreeItemWithID<KEYTYPE,VALUETYPE> getRootItem()
getRootItem in interface IBasicTree<VALUETYPE,DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>null. The root item
should not be displayed but it is the parent node of all displayed
root items and therefore cannot be removed.@Nullable default DefaultTreeItemWithID<KEYTYPE,VALUETYPE> getChildWithID(@Nullable DefaultTreeItemWithID<KEYTYPE,VALUETYPE> aCurrent, @Nullable KEYTYPE aID)
getChildWithID in interface com.helger.commons.hierarchy.IChildrenProviderWithID<KEYTYPE,DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>default boolean hasChildren(@Nullable DefaultTreeItemWithID<KEYTYPE,VALUETYPE> aCurrent)
hasChildren in interface com.helger.commons.hierarchy.IChildrenProvider<DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>default boolean hasNoChildren(@Nullable DefaultTreeItemWithID<KEYTYPE,VALUETYPE> aCurrent)
hasNoChildren in interface com.helger.commons.hierarchy.IChildrenProvider<DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>@Nonnegative default int getChildCount(@Nullable DefaultTreeItemWithID<KEYTYPE,VALUETYPE> aCurrent)
getChildCount in interface com.helger.commons.hierarchy.IChildrenProvider<DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>@Nullable default com.helger.commons.collection.impl.ICommonsCollection<? extends DefaultTreeItemWithID<KEYTYPE,VALUETYPE>> getAllChildren(@Nullable DefaultTreeItemWithID<KEYTYPE,VALUETYPE> aCurrent)
getAllChildren in interface com.helger.commons.hierarchy.IChildrenProvider<DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>@Nullable default DefaultTreeItemWithID<KEYTYPE,VALUETYPE> getItemWithID(@Nullable KEYTYPE aDataID)
ITreeWithGlobalUniqueIDITreeItemWithID that corresponds to the given ID.getItemWithID in interface ITreeWithGlobalUniqueID<KEYTYPE,VALUETYPE,DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>aDataID - The ID of the tree item to search.null if no such tree item exists.@Nonnegative default int getItemCount()
getItemCount in interface ITreeWithGlobalUniqueID<KEYTYPE,VALUETYPE,DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>@Nonnull default com.helger.commons.collection.impl.ICommonsCollection<DefaultTreeItemWithID<KEYTYPE,VALUETYPE>> getAllItems()
getAllItems in interface ITreeWithGlobalUniqueID<KEYTYPE,VALUETYPE,DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>null collection of all items.default boolean isItemSameOrDescendant(@Nullable KEYTYPE aParentItemID, @Nullable KEYTYPE aChildItemID)
ITreeWithGlobalUniqueIDisItemSameOrDescendant in interface ITreeWithGlobalUniqueID<KEYTYPE,VALUETYPE,DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>aParentItemID - The parent item ID to a validate.aChildItemID - The item ID to check whether it is a child of the passed parent
folder.true if the child item is the same or a child of the
parent item, false if one of the IDs could not be
resolved or they are not in a parent-child-relationship.default boolean containsItemWithID(@Nullable KEYTYPE aDataID)
ITreeWithGlobalUniqueIDcontainsItemWithID in interface ITreeWithGlobalUniqueID<KEYTYPE,VALUETYPE,DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>aDataID - The ID of the tree item to search.true if such an item is present@Nullable default VALUETYPE getItemDataWithID(@Nullable KEYTYPE aDataID)
ITreeWithGlobalUniqueIDgetItemDataWithID in interface ITreeWithGlobalUniqueID<KEYTYPE,VALUETYPE,DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>aDataID - The ID of the tree item to search.null if no such tree item exists.@Nonnull @ReturnsMutableCopy default com.helger.commons.collection.impl.ICommonsCollection<VALUETYPE> getAllItemDatas()
getAllItemDatas in interface ITreeWithGlobalUniqueID<KEYTYPE,VALUETYPE,DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>null collection of all item datas.@Nonnull default com.helger.commons.state.EChange removeItemWithID(@Nullable KEYTYPE aDataID)
ITreeWithGlobalUniqueIDremoveItemWithID in interface ITreeWithGlobalUniqueID<KEYTYPE,VALUETYPE,DefaultTreeItemWithID<KEYTYPE,VALUETYPE>>aDataID - The ID of the item to be removedEChange.CHANGED if the item was removed,
EChange.UNCHANGED otherwise. Never null.Copyright © 2014–2021 Philip Helger. All rights reserved.