public final class ChildrenProviderElementWithName extends Object implements IChildrenProvider<IMicroElement>
IChildrenProvider for IMicroElement
objects considering only elements with a certain element name (and optionally
a namespace URI).| Constructor and Description |
|---|
ChildrenProviderElementWithName(String sTagName) |
ChildrenProviderElementWithName(String sNamespaceURI,
String sTagName) |
| Modifier and Type | Method and Description |
|---|---|
Collection<? extends IMicroElement> |
getAllChildren(IMicroElement aCurrent)
Get the children of the passed object.
|
int |
getChildCount(IMicroElement aCurrent) |
boolean |
hasChildren(IMicroElement aCurrent)
Check if an item has children.
|
public ChildrenProviderElementWithName(@Nonnull @Nonempty String sTagName)
public boolean hasChildren(@Nullable IMicroElement aCurrent)
IChildrenProviderhasChildren in interface IChildrenProvider<IMicroElement>aCurrent - The object to determine the children of. No null or
non- null constraint possible.true if this item has children, false
otherwise.@Nonnegative public int getChildCount(@Nullable IMicroElement aCurrent)
getChildCount in interface IChildrenProvider<IMicroElement>aCurrent - The object to determine the children count of. No null
or non- null constraint possible.@Nonnull @ReturnsMutableCopy public Collection<? extends IMicroElement> getAllChildren(@Nullable IMicroElement aCurrent)
IChildrenProvidergetAllChildren in interface IChildrenProvider<IMicroElement>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.