Interface Composable<C>

Type Parameters:
C - type of the children. Should typically be the sub-type implementing this interface itself.
All Superinterfaces:
Iterable<C>

public interface Composable<C> extends Iterable<C>
Interface for an object that may contain children.
Since:
1.0.0
  • Method Details

    • getChildCount

      int getChildCount()
      Returns:
      the number of contained children.
      See Also:
    • getChild

      C getChild(int index)
      Gets the child-object at the given index.
      Parameters:
      index - is the index of the child to get.
      Returns:
      the requested child or null if no such child exists because the given index is not in the range from 0 to child-count - 1.
      See Also:
    • iterator

      default Iterator<C> iterator()
      Specified by:
      iterator in interface Iterable<C>