CHILDTYPE - The type of the children to retrieve.public interface IChildrenProvider<CHILDTYPE>
| Modifier and Type | Method and Description |
|---|---|
ICommonsCollection<? extends CHILDTYPE> |
getAllChildren(CHILDTYPE aCurrent)
Get the children of the passed object.
|
int |
getChildCount(CHILDTYPE aCurrent) |
default boolean |
hasChildren(CHILDTYPE aCurrent)
Check if an item has children.
|
default boolean |
hasNoChildren(CHILDTYPE aCurrent)
Check if an item has no children.
|
default boolean hasChildren(CHILDTYPE aCurrent)
aCurrent - The object to determine the children of. No null or
non- null constraint possible.true if this item has children, false
otherwise.default boolean hasNoChildren(CHILDTYPE aCurrent)
aCurrent - The object to determine the children of. No null or
non- null constraint possible.true if this item has no children, false
otherwise.@Nonnegative int getChildCount(CHILDTYPE aCurrent)
aCurrent - The object to determine the children count of. No null
or non- null constraint possible.@Nullable ICommonsCollection<? extends CHILDTYPE> getAllChildren(CHILDTYPE aCurrent)
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 hasChildren(Object) with
the same object returned true.Copyright © 2014–2022 Philip Helger. All rights reserved.