@Test public void emptyRoot() throws Exception { SortingNode<Long> emptyRoot = SortingNode.emptyRoot(); assertFalse(emptyRoot.hasChild()); assertTrue(emptyRoot.isRoot()); assertFalse(emptyRoot.hasParent()); }
@SuppressWarnings("unchecked") public static <T> SortingNode<T> emptyRoot() { return (SortingNode<T>) EMPTY_ROOT; }
SortingNode { @SuppressWarnings("unchecked") public static <T> SortingNode<T> emptyRoot() { return (SortingNode<T>) EMPTY_ROOT; } }
SortingNode { @SuppressWarnings("unchecked") public static <T> SortingNode<T> emptyRoot() { return (SortingNode<T>) EMPTY_ROOT; } private  SortingNode(@Nullable T value,
      @Nullable SortingNode<T> parent,
      Stream<UnaryOperator<SortingNode<T>>> childrenFactory); private  SortingNode(@Nullable T value,
      @Nullable SortingNode<T> parent,
      ImmutableList<SortingNode<T>> children); }
SortingNode { @SuppressWarnings("unchecked") public static <T> SortingNode<T> emptyRoot() { return (SortingNode<T>) EMPTY_ROOT; } private  SortingNode(@Nullable T value,
      @Nullable SortingNode<T> parent,
      Stream<UnaryOperator<SortingNode<T>>> childrenFactory); private  SortingNode(@Nullable T value,
      @Nullable SortingNode<T> parent,
      ImmutableList<SortingNode<T>> children); @SuppressWarnings("unchecked") static SortingNode<T> emptyRoot(); @Override String toString(); @Nullable T getValue(); @Nullable SortingNode<T> getParent(); boolean hasParent(); boolean isRoot(); List<SortingNode<T>> getChildren(); boolean hasChild(); SortingNode<T> deepSort(Comparator<SortingNode<T>> comparator); String prettyPrint(); Stream<T> depthFirst(); Stream<T> breathFirst(); }
SortingNode { @SuppressWarnings("unchecked") public static <T> SortingNode<T> emptyRoot() { return (SortingNode<T>) EMPTY_ROOT; } private  SortingNode(@Nullable T value,
      @Nullable SortingNode<T> parent,
      Stream<UnaryOperator<SortingNode<T>>> childrenFactory); private  SortingNode(@Nullable T value,
      @Nullable SortingNode<T> parent,
      ImmutableList<SortingNode<T>> children); @SuppressWarnings("unchecked") static SortingNode<T> emptyRoot(); @Override String toString(); @Nullable T getValue(); @Nullable SortingNode<T> getParent(); boolean hasParent(); boolean isRoot(); List<SortingNode<T>> getChildren(); boolean hasChild(); SortingNode<T> deepSort(Comparator<SortingNode<T>> comparator); String prettyPrint(); Stream<T> depthFirst(); Stream<T> breathFirst();  }