@Test public void testStep() { checkSequence(tryParse("1,2,3,4,5").step(2), asList(1L, 3L, 5L), false); checkSequence(tryParse("1..5").step(2), asList(1L, 3L), false); checkSequence(tryParse("1,2,3,4..7,12..14").step(2), asList(1L, 3L, 5L, 12L), false); checkSequence(tryParse("1,2,3,4..7,12..14").skip(2).step(2), asList(3L, 5L, 12L), false); }
public abstract NumberSequence step(long step);
NumberSequence { public abstract NumberSequence step(long step); }
NumberSequence { public abstract NumberSequence step(long step);  }
NumberSequence { public abstract NumberSequence step(long step);  abstract long getCount(); abstract Iterator<Long> getIterator(); abstract boolean matches(long number); abstract NumberSequence skip(long skipCount); abstract NumberSequence step(long step); static NumberSequence from(long from); static Either<NumberSequence, String> parse(String value); }
NumberSequence { public abstract NumberSequence step(long step);  abstract long getCount(); abstract Iterator<Long> getIterator(); abstract boolean matches(long number); abstract NumberSequence skip(long skipCount); abstract NumberSequence step(long step); static NumberSequence from(long from); static Either<NumberSequence, String> parse(String value);  }