com.google.common.collect

## Class BinaryTreeTraverser<T>

- java.lang.Object
- - com.google.common.collect.TreeTraverser<T>
  - - com.google.common.collect.BinaryTreeTraverser<T>

-     @Beta
      @GwtCompatible(emulated=true)
      public abstract class BinaryTreeTraverser<T>
      extends TreeTraverser<T>

  A variant of `TreeTraverser` for binary trees, providing additional traversals specific to binary trees.
  Since:
    15.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BinaryTreeTraverser()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Iterable<T>` | `children(T root)` Returns the children of this node, in left-to-right order.
    `FluentIterable<T>` | `inOrderTraversal(T root)`
    `abstract Optional<T>` | `leftChild(T root)` Returns the left child of the specified node, or `Optional.absent()` if the specified node has no left child.
    `abstract Optional<T>` | `rightChild(T root)` Returns the right child of the specified node, or `Optional.absent()` if the specified node has no right child.

    - ### Methods inherited from class com.google.common.collect.TreeTraverser

      `breadthFirstTraversal, postOrderTraversal, preOrderTraversal`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BinaryTreeTraverser

          public BinaryTreeTraverser()

  - ### Method Detail

    - #### leftChild

          public abstract Optional<T> leftChild(T root)

      Returns the left child of the specified node, or `Optional.absent()` if the specified node has no left child.

    - #### rightChild

          public abstract Optional<T> rightChild(T root)

      Returns the right child of the specified node, or `Optional.absent()` if the specified node has no right child.

    - #### children

          public final java.lang.Iterable<T> children(T root)

      Returns the children of this node, in left-to-right order.
      Specified by:
        `children` in class `TreeTraverser<T>`

    - #### inOrderTraversal

          public final FluentIterable<T> inOrderTraversal(T root)