@Test public void newBuilder() throws Exception { TestKey testKey1 = new TestKey("Hello"); TestKey testKey2 = new TestKey("World"); assertThat(History.newBuilder().add(testKey1).add(testKey2).build()).containsExactly(testKey1, testKey2); }
@Nonnull public static Builder newBuilder() { return new Builder(); }
History extends AbstractList<T> implements List<T> { @Nonnull public static Builder newBuilder() { return new Builder(); } }
History extends AbstractList<T> implements List<T> { @Nonnull public static Builder newBuilder() { return new Builder(); } History();   History(List<T> elements); }
History extends AbstractList<T> implements List<T> { @Nonnull public static Builder newBuilder() { return new Builder(); } History();   History(List<T> elements); @Nullable K top(); @Nonnull K fromTop(int offset); @Nullable K root(); @Nonnull Builder buildUpon(); @SuppressWarnings("unchecked") // @SafeVarargs is API 19+ @Nonnull static History<T> of(T... keys); @Nonnull static History<T> from(@Nonnull List<? extends T> keys); @Nonnull static Builder builderFrom(@Nonnull Backstack backstack); @Nonnull static Builder builderFrom(@Nonnull BackstackDelegate backstackDelegate); @SuppressWarnings("unchecked") // @SafeVarargs is API 19+ @Nonnull static Builder builderOf(Object... keys); @Nonnull static Builder builderFrom(@Nonnull List<?> keys); @Nonnull static Builder newBuilder(); @Nonnull static History<T> single(@Nonnull T key); @Override boolean add(T t); @Override T set(int index, T element); @Override void add(int index, T element); @Override T remove(int index); @Override int indexOf(Object o); @Override int lastIndexOf(Object o); @Override void clear(); @Override boolean addAll(int index, Collection<? extends T> c); @Nonnull @Override Iterator<T> iterator(); @Nonnull @Override ListIterator<T> listIterator(); @Nonnull @Override ListIterator<T> listIterator(int index); @Nonnull @Override List<T> subList(int fromIndex, int toIndex); @Override boolean equals(Object o); @Override int hashCode(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Nonnull @Override Object[] toArray(); @Nonnull @Override T1[] toArray(@Nonnull T1[] a); @Override boolean remove(Object o); @Override boolean containsAll(@Nonnull Collection<?> c); @Override boolean addAll(@Nonnull Collection<? extends T> c); @Override boolean removeAll(@Nonnull Collection<?> c); @Override boolean retainAll(@Nonnull Collection<?> c); @Override String toString(); @Override T get(int index); @Override int size(); @Override @TargetApi(24) boolean removeIf(Predicate<? super T> filter); @Override @TargetApi(24) void replaceAll(UnaryOperator<T> operator); @Override @TargetApi(24) void sort(Comparator<? super T> c); @Override @TargetApi(24) Spliterator<T> spliterator(); @Override @TargetApi(24) Stream<T> stream(); @Override @TargetApi(24) Stream<T> parallelStream(); @Override @TargetApi(24) void forEach(Consumer<? super T> action); }
History extends AbstractList<T> implements List<T> { @Nonnull public static Builder newBuilder() { return new Builder(); } History();   History(List<T> elements); @Nullable K top(); @Nonnull K fromTop(int offset); @Nullable K root(); @Nonnull Builder buildUpon(); @SuppressWarnings("unchecked") // @SafeVarargs is API 19+ @Nonnull static History<T> of(T... keys); @Nonnull static History<T> from(@Nonnull List<? extends T> keys); @Nonnull static Builder builderFrom(@Nonnull Backstack backstack); @Nonnull static Builder builderFrom(@Nonnull BackstackDelegate backstackDelegate); @SuppressWarnings("unchecked") // @SafeVarargs is API 19+ @Nonnull static Builder builderOf(Object... keys); @Nonnull static Builder builderFrom(@Nonnull List<?> keys); @Nonnull static Builder newBuilder(); @Nonnull static History<T> single(@Nonnull T key); @Override boolean add(T t); @Override T set(int index, T element); @Override void add(int index, T element); @Override T remove(int index); @Override int indexOf(Object o); @Override int lastIndexOf(Object o); @Override void clear(); @Override boolean addAll(int index, Collection<? extends T> c); @Nonnull @Override Iterator<T> iterator(); @Nonnull @Override ListIterator<T> listIterator(); @Nonnull @Override ListIterator<T> listIterator(int index); @Nonnull @Override List<T> subList(int fromIndex, int toIndex); @Override boolean equals(Object o); @Override int hashCode(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Nonnull @Override Object[] toArray(); @Nonnull @Override T1[] toArray(@Nonnull T1[] a); @Override boolean remove(Object o); @Override boolean containsAll(@Nonnull Collection<?> c); @Override boolean addAll(@Nonnull Collection<? extends T> c); @Override boolean removeAll(@Nonnull Collection<?> c); @Override boolean retainAll(@Nonnull Collection<?> c); @Override String toString(); @Override T get(int index); @Override int size(); @Override @TargetApi(24) boolean removeIf(Predicate<? super T> filter); @Override @TargetApi(24) void replaceAll(UnaryOperator<T> operator); @Override @TargetApi(24) void sort(Comparator<? super T> c); @Override @TargetApi(24) Spliterator<T> spliterator(); @Override @TargetApi(24) Stream<T> stream(); @Override @TargetApi(24) Stream<T> parallelStream(); @Override @TargetApi(24) void forEach(Consumer<? super T> action);  }