@Test public void testPrevious() { assertNull("previous() should return null for the first item", sequence.previous("a")); final String message = "previous() should return the previous item in the sequence"; assertEquals(message, "a", sequence.previous("b")); assertEquals(message, "b", sequence.previous("c")); }
@Override public T previous(T item) { return stepFrom(item, ONE_BACKWARDS); }
ListSequence implements Sequence<T> { @Override public T previous(T item) { return stepFrom(item, ONE_BACKWARDS); } }
ListSequence implements Sequence<T> { @Override public T previous(T item) { return stepFrom(item, ONE_BACKWARDS); } @SafeVarargs  ListSequence(T... items);  ListSequence(List<T> aList); }
ListSequence implements Sequence<T> { @Override public T previous(T item) { return stepFrom(item, ONE_BACKWARDS); } @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 previous(T item) { return stepFrom(item, ONE_BACKWARDS); } @SafeVarargs  ListSequence(T... items);  ListSequence(List<T> aList); @Override T previous(T item); @Override T next(T item);  }