@Test public void sortFromLeafToRootEmptyMailboxShouldReturnEmpty() { ImmutableList<Mailbox> input = ImmutableList.of(); List<Mailbox> result = sut.sortFromLeafToRoot(input); assertThat(result).isEmpty(); }
public List<T> sortFromLeafToRoot(Collection<T> elements) throws CycleDetectedException { return Lists.reverse(sortFromRootToLeaf(elements)); }
SortingHierarchicalCollections { public List<T> sortFromLeafToRoot(Collection<T> elements) throws CycleDetectedException { return Lists.reverse(sortFromRootToLeaf(elements)); } }
SortingHierarchicalCollections { public List<T> sortFromLeafToRoot(Collection<T> elements) throws CycleDetectedException { return Lists.reverse(sortFromRootToLeaf(elements)); } SortingHierarchicalCollections(Function<T, IdT> index,
                                  Function<T, Optional<IdT>> parentId); }
SortingHierarchicalCollections { public List<T> sortFromLeafToRoot(Collection<T> elements) throws CycleDetectedException { return Lists.reverse(sortFromRootToLeaf(elements)); } SortingHierarchicalCollections(Function<T, IdT> index,
                                  Function<T, Optional<IdT>> parentId); List<T> sortFromRootToLeaf(Collection<T> elements); List<T> sortFromLeafToRoot(Collection<T> elements); }
SortingHierarchicalCollections { public List<T> sortFromLeafToRoot(Collection<T> elements) throws CycleDetectedException { return Lists.reverse(sortFromRootToLeaf(elements)); } SortingHierarchicalCollections(Function<T, IdT> index,
                                  Function<T, Optional<IdT>> parentId); List<T> sortFromRootToLeaf(Collection<T> elements); List<T> sortFromLeafToRoot(Collection<T> elements);  }