Class HCCtrlHelper


  • @Immutable
    public final class HCCtrlHelper
    extends Object
    Helper class for IHCControl stuff.
    Author:
    Philip Helger
    • Method Detail

      • getFirstHCControl

        @Nullable
        public static IHCControl<?> getFirstHCControl​(@Nullable
                                                      IHCNode aNode)
        Find the first instance of IHCControl that is either the passed element or a child of the passed element.
        Parameters:
        aNode - The source node to start searching. May be null.
        Returns:
        null if no IHCControl can be found below the passed node.
      • getAllHCControls

        public static void getAllHCControls​(@Nullable
                                            IHCNode aNode,
                                            @Nonnull
                                            Consumer<? super IHCControl<?>> aConsumer)
        Recursively determine all IHCControl elements from and incl. the passed node
        Parameters:
        aNode - The start node. May be null.
        aConsumer - The consumer to be invoked. May not be null.
      • getAllHCControls

        @Nonnull
        @ReturnsMutableCopy
        public static com.helger.commons.collection.impl.ICommonsList<IHCControl<?>> getAllHCControls​(@Nullable
                                                                                                      IHCNode aNode)
        Recursively determine all IHCControl elements from and incl. the passed node
        Parameters:
        aNode - The start node. May be null.
        Returns:
        The filled list with all controls. Never null but maybe empty.
      • getAllHCControls

        public static void getAllHCControls​(@Nullable
                                            Iterable<? extends IHCNode> aNodes,
                                            @Nonnull
                                            Consumer<? super IHCControl<?>> aConsumer)
        Recursively determine all IHCControl elements from and incl. the passed nodes
        Parameters:
        aNodes - The start nodes. May be null.
        aConsumer - The consumer to be invoked. May not be null.
      • getAllHCControls

        @Nonnull
        @ReturnsMutableCopy
        public static com.helger.commons.collection.impl.ICommonsList<IHCControl<?>> getAllHCControls​(@Nullable
                                                                                                      Iterable<? extends IHCNode> aNodes)
        Recursively determine all IHCControl elements from and incl. the passed nodes
        Parameters:
        aNodes - The start nodes. May be null.
        Returns:
        The filled list with all controls. Never null but maybe empty.