@Test public void skip() { assertSame(seq, seq.skip(0)); ReverseSequence skipped = seq.skip(1); assertEquals(5, skipped.getBegin()); assertEquals(6, skipped.getEnd()); assertEquals(1, skipped.size()); assertArrayEquals(new int[]{5}, skipped.stream().toArray()); }
@Override public ReverseSequence skip(int n) { if (n < 0 || n > size()) throw new NoSuchElementException("index " + n + " outside range [0.." + size() + "]"); if (n == 0) return this; return new ReverseSequence(begin, end - n); }
ReverseSequence implements Sequence { @Override public ReverseSequence skip(int n) { if (n < 0 || n > size()) throw new NoSuchElementException("index " + n + " outside range [0.." + size() + "]"); if (n == 0) return this; return new ReverseSequence(begin, end - n); } }
ReverseSequence implements Sequence { @Override public ReverseSequence skip(int n) { if (n < 0 || n > size()) throw new NoSuchElementException("index " + n + " outside range [0.." + size() + "]"); if (n == 0) return this; return new ReverseSequence(begin, end - n); }  }
ReverseSequence implements Sequence { @Override public ReverseSequence skip(int n) { if (n < 0 || n > size()) throw new NoSuchElementException("index " + n + " outside range [0.." + size() + "]"); if (n == 0) return this; return new ReverseSequence(begin, end - n); }  @Override Comparator<C> getComparator(); @Override int get(int n); @Override ReverseSequence limit(int n); @Override ReverseSequence skip(int n); @Override Spliterator.OfInt spliterator(); @Override Iterator<Integer> iterator(); @Override IntStream stream(); @Override IntStream parallelStream(); @Override Sequence reverse(); @Override int size(); }
ReverseSequence implements Sequence { @Override public ReverseSequence skip(int n) { if (n < 0 || n > size()) throw new NoSuchElementException("index " + n + " outside range [0.." + size() + "]"); if (n == 0) return this; return new ReverseSequence(begin, end - n); }  @Override Comparator<C> getComparator(); @Override int get(int n); @Override ReverseSequence limit(int n); @Override ReverseSequence skip(int n); @Override Spliterator.OfInt spliterator(); @Override Iterator<Integer> iterator(); @Override IntStream stream(); @Override IntStream parallelStream(); @Override Sequence reverse(); @Override int size(); static int SPLITERATOR_CHARACTERISTICS; }