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 the
IChildrenProviderWithID interface that works
with all types that implement IHasChildren and IHasID.- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetChildWithID(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, hasChildrenMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.helger.commons.hierarchy.IChildrenProvider
getAllChildren, getChildCount, hasChildren, hasNoChildren
-
Constructor Details
-
ChildrenProviderHasChildrenWithID
public ChildrenProviderHasChildrenWithID()
-
-
Method Details
-
getChildWithID
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
-