CHILDTYPE - The data type of the child objects.@Immutable public class ChildrenProviderHasChildrenSorting<CHILDTYPE extends IHasChildren<CHILDTYPE>> extends ChildrenProviderHasChildren<CHILDTYPE>
IChildrenProvider interface that works
with all types that implement
IHasChildren. It automatically sorts the
returned children by the specified comparator.| Constructor and Description |
|---|
ChildrenProviderHasChildrenSorting(Comparator<? super CHILDTYPE> aComparator) |
| Modifier and Type | Method and Description |
|---|---|
ICommonsList<? extends CHILDTYPE> |
getAllChildren(CHILDTYPE aCurrent)
Get the children of the passed object.
|
Comparator<? super CHILDTYPE> |
getComparator() |
getChildCount, hasChildrenclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasNoChildrenpublic ChildrenProviderHasChildrenSorting(@Nonnull Comparator<? super CHILDTYPE> aComparator)
@Nonnull public Comparator<? super CHILDTYPE> getComparator()
@Nullable public ICommonsList<? extends CHILDTYPE> getAllChildren(@Nullable CHILDTYPE aCurrent)
IChildrenProvidergetAllChildren in interface IChildrenProvider<CHILDTYPE extends IHasChildren<CHILDTYPE>>getAllChildren in class ChildrenProviderHasChildren<CHILDTYPE extends IHasChildren<CHILDTYPE>>aCurrent - The object to determine the children of. No null or
non-null constraint possible.null if there are no children.
If null is passed, the resolver is expected to return
any possible top level (root) elements. This method may NOT return
null if the call to IChildrenProvider.hasChildren(Object) with
the same object returned true.Copyright © 2014–2016 Philip Helger. All rights reserved.