Package com.helger.commons.hierarchy
Class ChildrenProviderHasChildrenWithID<KEYTYPE,CHILDTYPE extends IHasChildren<CHILDTYPE> & IHasID<KEYTYPE>>
- java.lang.Object
-
- com.helger.commons.hierarchy.ChildrenProviderHasChildren<CHILDTYPE>
-
- com.helger.commons.hierarchy.ChildrenProviderHasChildrenWithID<KEYTYPE,CHILDTYPE>
-
- Type Parameters:
KEYTYPE- The key type.CHILDTYPE- The data type of the child objects.
- All Implemented Interfaces:
IChildrenProvider<CHILDTYPE>,IChildrenProviderWithID<KEYTYPE,CHILDTYPE>
public class ChildrenProviderHasChildrenWithID<KEYTYPE,CHILDTYPE extends IHasChildren<CHILDTYPE> & IHasID<KEYTYPE>> extends ChildrenProviderHasChildren<CHILDTYPE> implements IChildrenProviderWithID<KEYTYPE,CHILDTYPE>
An implementation of theIChildrenProviderWithIDinterface that works with all types that implementIHasChildrenandIHasID.- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description ChildrenProviderHasChildrenWithID()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CHILDTYPEgetChildWithID(CHILDTYPE aCurrent, KEYTYPE aID)Retrieve the objects with the passed ID ornullif no such object.-
Methods inherited from class com.helger.commons.hierarchy.ChildrenProviderHasChildren
getAllChildren, getChildCount, hasChildren
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.helger.commons.hierarchy.IChildrenProvider
getAllChildren, getChildCount, hasChildren, hasNoChildren
-
-
-
-
Method Detail
-
getChildWithID
@Nullable public CHILDTYPE getChildWithID(@Nullable CHILDTYPE aCurrent, @Nullable KEYTYPE aID)
Description copied from interface:IChildrenProviderWithIDRetrieve the objects with the passed ID ornullif no such object.- Specified by:
getChildWithIDin interfaceIChildrenProviderWithID<KEYTYPE,CHILDTYPE extends IHasChildren<CHILDTYPE> & IHasID<KEYTYPE>>- Parameters:
aCurrent- The object to determine the children of. Nonullor non-nullconstraint possible.aID- the ID of the object in question. Nonullor non-nullconstraint possible.- Returns:
- the object with the passed ID or
null
-
-