Class TreeData<T>

java.lang.Object
org.aksw.facete.v3.api.TreeData<T>
All Implemented Interfaces:
Serializable

public class TreeData<T> extends Object implements Serializable
A stripped down copy of Vaadin's TreeData class. Used to capture hierarchical projections of FacetPaths.
See Also:
  • Constructor Details

    • TreeData

      public TreeData()
  • Method Details

    • map

      public <O> TreeData<O> map(Function<T,O> mapper)
    • cloneTree

      public TreeData<T> cloneTree()
      Return a new instance of this tree structure. Does not copy the elements of type T.
    • addItems

      public TreeData<T> addItems(Collection<T> rootItems, Function<T,? extends Collection<T>> childItemProvider)
    • putItem

      public void putItem(T item, Function<? super T,? extends T> getParent)
      Add an item to this structure by recursively adding its ancestors first.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • addRootItems

      public TreeData<T> addRootItems(T... items)
    • addRootItems

      public TreeData<T> addRootItems(Collection<T> items)
    • addRootItems

      public TreeData<T> addRootItems(Stream<T> items)
    • addItem

      public TreeData<T> addItem(T parent, T item)
    • addItems

      public TreeData<T> addItems(T parent, T... items)
    • addItems

      public TreeData<T> addItems(T parent, Collection<T> items)
    • addItems

      public TreeData<T> addItems(T parent, Stream<T> items)
    • removeItem

      public TreeData<T> removeItem(T item)
    • clear

      public TreeData<T> clear()
    • getRootItems

      public List<T> getRootItems()
    • getChildren

      public List<T> getChildren(T item)
    • getParent

      public T getParent(T item)
    • setParent

      public void setParent(T item, T parent)
    • moveAfterSibling

      public void moveAfterSibling(T item, T sibling)
    • contains

      public boolean contains(T item)