@Test public void testClosedInterval() { SubRange range = new SubRange(0, 100); for (int i = 0; i <= 100; i++) { assertThat(range.includes(i), equalTo(true)); } }
public boolean includes(@Nullable Integer integer) { return integer != null && includes(integer.intValue()); }
SubRange implements Serializable, Comparable<SubRange> { public boolean includes(@Nullable Integer integer) { return integer != null && includes(integer.intValue()); } }
SubRange implements Serializable, Comparable<SubRange> { public boolean includes(@Nullable Integer integer) { return integer != null && includes(integer.intValue()); } SubRange(int start, int end); @JsonCreator  SubRange(@Nullable Object o); }
SubRange implements Serializable, Comparable<SubRange> { public boolean includes(@Nullable Integer integer) { return integer != null && includes(integer.intValue()); } SubRange(int start, int end); @JsonCreator  SubRange(@Nullable Object o); static SubRange singleton(int value); IntStream asStream(); @Override int compareTo(@Nonnull SubRange rhs); boolean contains(@Nonnull SubRange other); @Override boolean equals(Object o); int getEnd(); int getStart(); @Override int hashCode(); boolean includes(@Nullable Integer integer); boolean includes(int integer); Optional<SubRange> intersection(SubRange other); boolean isEmpty(); boolean isSingleValue(); @JsonValue String serializedForm(); @Override String toString(); }
SubRange implements Serializable, Comparable<SubRange> { public boolean includes(@Nullable Integer integer) { return integer != null && includes(integer.intValue()); } SubRange(int start, int end); @JsonCreator  SubRange(@Nullable Object o); static SubRange singleton(int value); IntStream asStream(); @Override int compareTo(@Nonnull SubRange rhs); boolean contains(@Nonnull SubRange other); @Override boolean equals(Object o); int getEnd(); int getStart(); @Override int hashCode(); boolean includes(@Nullable Integer integer); boolean includes(int integer); Optional<SubRange> intersection(SubRange other); boolean isEmpty(); boolean isSingleValue(); @JsonValue String serializedForm(); @Override String toString();  }