T
- type of the tree's valuespublic static final class Tree.Empty<T> extends Object implements Tree<T>, Serializable
Tree.Empty<T>, Tree.Node<T>, Tree.Order
Modifier and Type | Method and Description |
---|---|
String |
draw()
Creates a neat 2-dimensional drawing of a tree.
|
boolean |
equals(Object o)
Clarifies that values have a proper equals() method implemented.
|
List<Tree.Node<T>> |
getChildren()
Returns the children of this tree.
|
T |
getValue()
Gets the value of this tree.
|
int |
hashCode()
Clarifies that values have a proper hashCode() method implemented.
|
static <T> Tree.Empty<T> |
instance() |
boolean |
isEmpty()
Checks if this Traversable is empty.
|
boolean |
isLeaf()
Checks if this Tree is a leaf.
|
int |
length()
Computes the number of elements of this Traversable.
|
String |
toString()
Clarifies that values have a proper toString() method implemented.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
branchCount, collector, distinct, distinctBy, distinctBy, drop, dropRight, dropUntil, dropWhile, empty, fill, filter, flatMap, foldRight, groupBy, grouped, hasDefiniteSize, head, init, initOption, isBranch, isDistinct, isTraversableAgain, iterator, iterator, leafCount, map, narrow, nodeCount, of, of, of, of, ofAll, ofAll, partition, peek, replace, replaceAll, retainAll, scan, scanLeft, scanRight, sliding, sliding, span, spliterator, stringPrefix, tabulate, tail, tailOption, take, takeRight, takeUntil, takeWhile, transform, traverse, traverse, unzip, unzip3, values, values, zip, zipAll, zipWith, zipWithIndex, zipWithIndex
average, containsAll, count, existsUnique, find, findLast, foldLeft, get, hash, headOption, isOrdered, isSingleValued, last, lastOption, max, maxBy, maxBy, min, minBy, minBy, mkCharSeq, mkCharSeq, mkCharSeq, mkString, mkString, mkString, narrow, nonEmpty, product, reduceLeft, reduceLeftOption, reduceRight, reduceRightOption, single, singleOption, size, sum
fold, reduce, reduceOption
collect, collect, contains, corresponds, eq, exists, forAll, forEach, getOption, getOrElse, getOrElse, getOrElseThrow, getOrElseTry, narrow, out, out, stderr, stdout, toArray, toCharSeq, toEither, toEither, toInvalid, toInvalid, toJavaArray, toJavaArray, toJavaCollection, toJavaList, toJavaList, toJavaMap, toJavaMap, toJavaMap, toJavaOptional, toJavaParallelStream, toJavaSet, toJavaSet, toJavaStream, toLeft, toLeft, toLinkedMap, toLinkedMap, toLinkedSet, toList, toMap, toMap, toOption, toPriorityQueue, toPriorityQueue, toQueue, toRight, toRight, toSet, toSortedMap, toSortedMap, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toStack, toStream, toTree, toTry, toTry, toValid, toValid, toValidation, toValidation, toVector
public static <T> Tree.Empty<T> instance()
public List<Tree.Node<T>> getChildren()
Tree
getChildren
in interface Tree<T>
public boolean isEmpty()
Traversable
public int length()
Traversable
Same as Traversable.size()
.
length
in interface Traversable<T>
public boolean isLeaf()
Tree
public boolean equals(Object o)
Value
public int hashCode()
Value
See Object.hashCode().
public String toString()
Value
See Object.toString().
Copyright © 2016. All Rights Reserved.