@Test public void valid_range() { Range range = Range.from(RANGE_START, RANGE_END); assertThat(range).isNotNull(); }
public static Range from(@IntRange(from = 0) int start, @IntRange(from = 0) int end) { if (end < start) { throw new IllegalArgumentException("The end of the targetRange shouldn't be before the start"); } return new Range(start, end); }
Range implements Locator { public static Range from(@IntRange(from = 0) int start, @IntRange(from = 0) int end) { if (end < start) { throw new IllegalArgumentException("The end of the targetRange shouldn't be before the start"); } return new Range(start, end); } }
Range implements Locator { public static Range from(@IntRange(from = 0) int start, @IntRange(from = 0) int end) { if (end < start) { throw new IllegalArgumentException("The end of the targetRange shouldn't be before the start"); } return new Range(start, end); } private  Range(int start, int end); }
Range implements Locator { public static Range from(@IntRange(from = 0) int start, @IntRange(from = 0) int end) { if (end < start) { throw new IllegalArgumentException("The end of the targetRange shouldn't be before the start"); } return new Range(start, end); } private  Range(int start, int end); static Range from(@IntRange(from = 0) int start, @IntRange(from = 0) int end); @NonNull @Override List<TargetRange> locate(@NonNull String content); }
Range implements Locator { public static Range from(@IntRange(from = 0) int start, @IntRange(from = 0) int end) { if (end < start) { throw new IllegalArgumentException("The end of the targetRange shouldn't be before the start"); } return new Range(start, end); } private  Range(int start, int end); static Range from(@IntRange(from = 0) int start, @IntRange(from = 0) int end); @NonNull @Override List<TargetRange> locate(@NonNull String content);  }