@Test public void testNext() { final String message = "next() should return the next item in the sequence"; assertEquals(message, "b", sequence.next("a")); assertEquals(message, "c", sequence.next("b")); assertNull("next() should return null for last item", sequence.next("c")); }
@Override public T next(T item) { return stepFrom(item, ONE_FORWARD); }
ListSequence implements Sequence<T> { @Override public T next(T item) { return stepFrom(item, ONE_FORWARD); } }
ListSequence implements Sequence<T> { @Override public T next(T item) { return stepFrom(item, ONE_FORWARD); } @SafeVarargs  ListSequence(T... items);  ListSequence(List<T> aList); }
ListSequence implements Sequence<T> { @Override public T next(T item) { return stepFrom(item, ONE_FORWARD); } @SafeVarargs  ListSequence(T... items);  ListSequence(List<T> aList); @Override T previous(T item); @Override T next(T item); }
ListSequence implements Sequence<T> { @Override public T next(T item) { return stepFrom(item, ONE_FORWARD); } @SafeVarargs  ListSequence(T... items);  ListSequence(List<T> aList); @Override T previous(T item); @Override T next(T item);  }