Package com.helger.tree.withid.unique
Interface ITreeItemWithUniqueIDFactory<KEYTYPE,DATATYPE,ITEMTYPE extends ITreeItemWithID<KEYTYPE,DATATYPE,ITEMTYPE>>
-
- Type Parameters:
KEYTYPE- The key type.DATATYPE- The value type to be contained in tree items.ITEMTYPE- tree item type
- All Superinterfaces:
ITreeItemWithIDFactory<KEYTYPE,DATATYPE,ITEMTYPE>
- All Known Subinterfaces:
IFolderTreeItemFactory<KEYTYPE,DATATYPE,COLLTYPE,ITEMTYPE>
- All Known Implementing Classes:
AbstractFolderTreeItemFactory,AbstractTreeItemWithUniqueIDFactory,DefaultFolderTreeItemFactory,DefaultTreeItemWithUniqueIDFactory
public interface ITreeItemWithUniqueIDFactory<KEYTYPE,DATATYPE,ITEMTYPE extends ITreeItemWithID<KEYTYPE,DATATYPE,ITEMTYPE>> extends ITreeItemWithIDFactory<KEYTYPE,DATATYPE,ITEMTYPE>
An abstract tree item factory that maintains a unique ID over all items!- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontainsItemWithDataID(KEYTYPE aDataID)Check if an item with the given ID is contained.com.helger.commons.collection.impl.ICommonsCollection<DATATYPE>getAllItemDatas()com.helger.commons.collection.impl.ICommonsCollection<ITEMTYPE>getAllItems()intgetItemCount()ITEMTYPEgetItemOfDataID(KEYTYPE aDataID)Try to retrieve the stored item with the given ID.-
Methods inherited from interface com.helger.tree.withid.ITreeItemWithIDFactory
create, createRoot, onAddItem, onRemoveItem
-
-
-
-
Method Detail
-
containsItemWithDataID
boolean containsItemWithDataID(@Nullable KEYTYPE aDataID)
Check if an item with the given ID is contained.- Parameters:
aDataID- The data ID to look up.- Returns:
trueif such an item is contained,falseotherwise.
-
getItemOfDataID
@Nullable ITEMTYPE getItemOfDataID(@Nullable KEYTYPE aDataID)
Try to retrieve the stored item with the given ID.- Parameters:
aDataID- The data ID to look up.- Returns:
nullif no such item is contained, the item otherwise.
-
getItemCount
@Nonnegative int getItemCount()
- Returns:
- The number of all contained items. Always ≥ 0.
-
getAllItems
@Nonnull @ReturnsMutableCopy com.helger.commons.collection.impl.ICommonsCollection<ITEMTYPE> getAllItems()
- Returns:
- A collection that contains all items created by this factory instance.
-
-