Interface ITreeModel

All Superinterfaces:
IModel, IValidable
All Known Implementing Classes:
InfobasePublicationsModel

public interface ITreeModel extends IModel
The interface of model for tree component.
Since:
1.0.0
  • Method Details

    • getElements

      Stream<Object> getElements()
      Returns a stream of top level objects
      Returns:
      a stream of top level objects, never null.
    • getChildren

      Stream<Object> getChildren(Object element)
      Returns a stream of children objects of the specified parent element.
      Parameters:
      element - the parent object to get its children, cannot be null.
      Returns:
      a stream of children objects, never null.
    • hasChildren

      boolean hasChildren(Object element)
      Returns true if the specfied element has children.
      Parameters:
      element - the element to test, cannot be null.
      Returns:
      true if the specfied element has children, false - otherwise.
      See Also:
    • getParent

      Optional<Object> getParent(Object element)
      Returns the parent object for the specified element.
      Parameters:
      element - the element to get its parent, cannot be null.
      Returns:
      the parent object or Optional.empty() if there is no parent element, never null