@Test public void testComparisons() { check(interval(4, 4), interval(4, 4), 0); check(interval(4, 4), interval(3, 4), 0); check(interval(4, 4), interval(4, 5), 0); check(interval(3, 5), interval(4, 4), 0); check(interval(3, 4), interval(4, 4), 0); check(interval(4, 5), interval(4, 4), 0); check(interval(3, 5), interval(4, 4), 0); check(interval(3, 4), interval(4, 5), -1); check(interval(4, 5), interval(3, 4), 1); checkNotComparable(interval(3, 5), interval(4, 6)); checkNotComparable(interval(4, 6), interval(3, 5)); }
public Interval(long x) { this(x, x); }
Interval implements Comparable<Interval> { public Interval(long x) { this(x, x); } }
Interval implements Comparable<Interval> { public Interval(long x) { this(x, x); } Interval(long x);  Interval(long min, long max); }
Interval implements Comparable<Interval> { public Interval(long x) { this(x, x); } Interval(long x);  Interval(long min, long max); String toString(); int compareTo(Interval that); long min(); long max(); }
Interval implements Comparable<Interval> { public Interval(long x) { this(x, x); } Interval(long x);  Interval(long min, long max); String toString(); int compareTo(Interval that); long min(); long max();  }