Interface IChildrenProvider<CHILDTYPE>

    • Method Detail

      • hasChildren

        default boolean hasChildren​(CHILDTYPE aCurrent)
        Check if an item has children.
        Parameters:
        aCurrent - The object to determine the children of. No null or non- null constraint possible.
        Returns:
        true if this item has children, false otherwise.
      • hasNoChildren

        default boolean hasNoChildren​(CHILDTYPE aCurrent)
        Check if an item has no children.
        Parameters:
        aCurrent - The object to determine the children of. No null or non- null constraint possible.
        Returns:
        true if this item has no children, false otherwise.
      • getChildCount

        @Nonnegative
        int getChildCount​(CHILDTYPE aCurrent)
        Parameters:
        aCurrent - The object to determine the children count of. No null or non- null constraint possible.
        Returns:
        The number of contained direct children. Always ≥ 0.
      • getAllChildren

        @Nullable
        ICommonsCollection<? extends CHILDTYPE> getAllChildren​(CHILDTYPE aCurrent)
        Get the children of the passed object.
        Parameters:
        aCurrent - The object to determine the children of. No null or non-null constraint possible.
        Returns:
        The child objects, or 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.