Class Tree

java.lang.Object
org.eclipse.net4j.util.collection.Tree
All Implemented Interfaces:
Comparable<Tree>

public final class Tree extends Object implements Comparable<Tree>
Since:
3.23
Author:
Eike Stepper
  • Field Details

    • EMPTY

      public static final Tree EMPTY
  • Method Details

    • name

      public String name()
    • attributes

      public Map<String,String> attributes()
    • attribute

      public String attribute(String name)
    • attribute

      public String attribute(String name, String defaultValue)
      Since:
      3.26
    • attribute

      public boolean attribute(String name, boolean defaultValue)
      Since:
      3.26
    • attribute

      public byte attribute(String name, byte defaultValue)
      Since:
      3.26
    • attribute

      public short attribute(String name, short defaultValue)
      Since:
      3.26
    • attribute

      public int attribute(String name, int defaultValue)
      Since:
      3.26
    • attribute

      public long attribute(String name, long defaultValue)
      Since:
      3.26
    • attribute

      public float attribute(String name, float defaultValue)
      Since:
      3.26
    • attribute

      public double attribute(String name, double defaultValue)
      Since:
      3.26
    • parent

      public Tree parent()
    • children

      public List<Tree> children()
    • children

      public void children(Consumer<Tree> consumer)
    • children

      public List<Tree> children(String name)
    • children

      public void children(String name, Consumer<Tree> consumer)
    • allChildren

      public List<Tree> allChildren()
    • allChildren

      public void allChildren(Consumer<Tree> consumer)
    • allChildren

      public List<Tree> allChildren(String name)
    • allChildren

      public void allChildren(String name, Consumer<Tree> consumer)
    • child

      public Tree child(String name)
    • child

      public Tree child(int index)
    • indexInParent

      public int indexInParent()
    • indexOfChild

      public int indexOfChild(Tree child)
    • properties

      public Map<String,String> properties()
    • properties

      public Map<String,String> properties(String childName)
    • properties

      public Map<String,String> properties(String childName, String nameAttribute, String valueAttribute)
    • visit

      public <DATA> DATA visit(BiFunction<Tree,DATA,DATA> visitor, DATA data)
    • compareTo

      public int compareTo(Tree o)
      Specified by:
      compareTo in interface Comparable<Tree>
    • toString

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

      public static Tree.Builder builder()
    • builder

      public static Tree.Builder builder(Tree source)