@Test public void testOf(){ assertWithinRange(Range.of(1,2,5,6), 1,2,5,6); assertNotWithinRange(Range.of(1, 2, 5, 6), 3,4,7,100); }
public static Range of(int ... indexes){ final Range range = new Range(); for(int i: indexes){ range.compositeRange.add(Range.includingSingleIndexOf(i)); } return range; }
Range { public static Range of(int ... indexes){ final Range range = new Range(); for(int i: indexes){ range.compositeRange.add(Range.includingSingleIndexOf(i)); } return range; } }
Range { public static Range of(int ... indexes){ final Range range = new Range(); for(int i: indexes){ range.compositeRange.add(Range.includingSingleIndexOf(i)); } return range; } private  Range(); private  Range(final AbstractRange range); }
Range { public static Range of(int ... indexes){ final Range range = new Range(); for(int i: indexes){ range.compositeRange.add(Range.includingSingleIndexOf(i)); } return range; } private  Range(); private  Range(final AbstractRange range); boolean isWithinRange(final int index); Range andOf(final int... indexes); Range andFromStartTo(final int to); Range andToEndFrom(final int from); Range andBetween(final int from, final int to); @Override String toString(); static Range of(int ... indexes); static Range fromStartTo(final int to); static Range toEndFrom(final int from); static Range between(final int from, final int to); }
Range { public static Range of(int ... indexes){ final Range range = new Range(); for(int i: indexes){ range.compositeRange.add(Range.includingSingleIndexOf(i)); } return range; } private  Range(); private  Range(final AbstractRange range); boolean isWithinRange(final int index); Range andOf(final int... indexes); Range andFromStartTo(final int to); Range andToEndFrom(final int from); Range andBetween(final int from, final int to); @Override String toString(); static Range of(int ... indexes); static Range fromStartTo(final int to); static Range toEndFrom(final int from); static Range between(final int from, final int to);  }