org.apache.tinkerpop.gremlin.process.traversal.step.util

## Class Tree<T>

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.HashMap<T,Tree<T>>
    - - org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree<T>

- All Implemented Interfaces:
    Serializable, Cloneable, Map<T,Tree<T>>

      public class Tree<T>
      extends HashMap<T,Tree<T>>
      implements Serializable

  Author:
    Marko A. Rodriguez (http://markorodriguez.com)
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `Map.Entry<K,V>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Tree()`
    `Tree(Map.Entry<T,Tree<T>>... children)`
    `Tree(T... children)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addTree(Tree<T> tree)`
    `List<T>` | `getLeafObjects()`
    `List<Tree<T>>` | `getLeafTrees()`
    `List<T>` | `getObjectsAtDepth(int depth)`
    `List<Tree<T>>` | `getTreesAtDepth(int depth)`
    `boolean` | `isLeaf()`
    `List<Tree<T>>` | `splitParents()`

    - ### Methods inherited from class java.util.HashMap

      `clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values`

    - ### Methods inherited from class java.util.AbstractMap

      `equals, hashCode, toString`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `equals, hashCode`

- - ### Constructor Detail

    - #### Tree

          public Tree()

    - #### Tree

          @SafeVarargs
          public Tree(T... children)

    - #### Tree

          @SafeVarargs
          public Tree(Map.Entry<T,Tree<T>>... children)

  - ### Method Detail

    - #### getTreesAtDepth

          public List<Tree<T>> getTreesAtDepth(int depth)

    - #### getObjectsAtDepth

          public List<T> getObjectsAtDepth(int depth)

    - #### getLeafTrees

          public List<Tree<T>> getLeafTrees()

    - #### getLeafObjects

          public List<T> getLeafObjects()

    - #### isLeaf

          public boolean isLeaf()

    - #### addTree

          public void addTree(Tree<T> tree)

    - #### splitParents

          public List<Tree<T>> splitParents()

Copyright © 2013–2020 Apache Software Foundation. All rights reserved.