Package com.helger.html.hc.html.forms
Class HCCtrlHelper
- java.lang.Object
-
- com.helger.html.hc.html.forms.HCCtrlHelper
-
@Immutable public final class HCCtrlHelper extends Object
Helper class forIHCControlstuff.- Author:
- Philip Helger
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.helger.commons.collection.impl.ICommonsList<IHCControl<?>>getAllHCControls(IHCNode aNode)Recursively determine allIHCControlelements from and incl. the passed nodestatic voidgetAllHCControls(IHCNode aNode, Consumer<? super IHCControl<?>> aConsumer)Recursively determine allIHCControlelements from and incl. the passed nodestatic com.helger.commons.collection.impl.ICommonsList<IHCControl<?>>getAllHCControls(Iterable<? extends IHCNode> aNodes)Recursively determine allIHCControlelements from and incl. the passed nodesstatic voidgetAllHCControls(Iterable<? extends IHCNode> aNodes, Consumer<? super IHCControl<?>> aConsumer)Recursively determine allIHCControlelements from and incl. the passed nodesstatic IHCControl<?>getFirstHCControl(IHCNode aNode)Find the first instance ofIHCControlthat is either the passed element or a child of the passed element.
-
-
-
Method Detail
-
getFirstHCControl
@Nullable public static IHCControl<?> getFirstHCControl(@Nullable IHCNode aNode)
Find the first instance ofIHCControlthat is either the passed element or a child of the passed element.- Parameters:
aNode- The source node to start searching. May benull.- Returns:
nullif noIHCControlcan be found below the passed node.
-
getAllHCControls
public static void getAllHCControls(@Nullable IHCNode aNode, @Nonnull Consumer<? super IHCControl<?>> aConsumer)
Recursively determine allIHCControlelements from and incl. the passed node- Parameters:
aNode- The start node. May benull.aConsumer- The consumer to be invoked. May not benull.
-
getAllHCControls
@Nonnull @ReturnsMutableCopy public static com.helger.commons.collection.impl.ICommonsList<IHCControl<?>> getAllHCControls(@Nullable IHCNode aNode)
Recursively determine allIHCControlelements from and incl. the passed node- Parameters:
aNode- The start node. May benull.- Returns:
- The filled list with all controls. Never
nullbut maybe empty.
-
getAllHCControls
public static void getAllHCControls(@Nullable Iterable<? extends IHCNode> aNodes, @Nonnull Consumer<? super IHCControl<?>> aConsumer)
Recursively determine allIHCControlelements from and incl. the passed nodes- Parameters:
aNodes- The start nodes. May benull.aConsumer- The consumer to be invoked. May not benull.
-
getAllHCControls
@Nonnull @ReturnsMutableCopy public static com.helger.commons.collection.impl.ICommonsList<IHCControl<?>> getAllHCControls(@Nullable Iterable<? extends IHCNode> aNodes)
Recursively determine allIHCControlelements from and incl. the passed nodes- Parameters:
aNodes- The start nodes. May benull.- Returns:
- The filled list with all controls. Never
nullbut maybe empty.
-
-