| Modifier and Type | Field and Description |
|---|---|
| public int | |
| public int | |
| pack-priv static final Interval[] | |
| public static final int | |
| public static final Interval |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public Interval | differenceNotProperlyContained(Interval other)
Return the interval with elements from this not in other; other must not be totally enclosed (properly contained) within this, which would result in two disjoint intervals instead of the single one returned by this method. |
| public boolean | |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public int | |
| public Interval | |
| public int | |
| public static Interval | of(int a, int b)
Interval objects are used readonly so share all with the same single value a==b up to some max size. |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public String | |
| public Interval |
| a | back to summary |
|---|---|
| public int a | |
| b | back to summary |
|---|---|
| public int b | |
| cache | back to summary |
|---|---|
| pack-priv static final Interval[] cache | |
| INTERVAL_POOL_MAX_VALUE | back to summary |
|---|---|
| public static final int INTERVAL_POOL_MAX_VALUE | |
| INVALID | back to summary |
|---|---|
| public static final Interval INVALID | |
| Interval | back to summary |
|---|---|
| public Interval(int a, int b) | |
| adjacent | back to summary |
|---|---|
| public boolean adjacent(Interval other) Are two intervals adjacent such as 0..41 and 42..42? | |
| differenceNotProperlyContained | back to summary |
|---|---|
| public Interval differenceNotProperlyContained(Interval other) Return the interval with elements from this not in other; other must not be totally enclosed (properly contained) within this, which would result in two disjoint intervals instead of the single one returned by this method. | |
| disjoint | back to summary |
|---|---|
| public boolean disjoint(Interval other) Are both ranges disjoint? I.e., no overlap? | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| intersection | back to summary |
|---|---|
| public Interval intersection(Interval other) Return the interval in common between this and o | |
| length | back to summary |
|---|---|
| public int length() return number of elements between a and b inclusively. x..x is length 1. if b < a, then length is 0. 9..10 has length 2. | |
| of | back to summary |
|---|---|
| public static Interval of(int a, int b) Interval objects are used readonly so share all with the same single value a==b up to some max size. Use an array as a perfect hash. Return shared object for 0..INTERVAL_POOL_MAX_VALUE or a new Interval object with a..a in it. On Java.g4, 218623 IntervalSets have a..a (set with 1 element). | |
| properlyContains | back to summary |
|---|---|
| public boolean properlyContains(Interval other) | |
| startsAfter | back to summary |
|---|---|
| public boolean startsAfter(Interval other) Does this.a start after other.b? May or may not be disjoint | |
| startsAfterDisjoint | back to summary |
|---|---|
| public boolean startsAfterDisjoint(Interval other) Does this start completely after other? Disjoint | |
| startsAfterNonDisjoint | back to summary |
|---|---|
| public boolean startsAfterNonDisjoint(Interval other) Does this start after other? NonDisjoint | |
| startsBeforeDisjoint | back to summary |
|---|---|
| public boolean startsBeforeDisjoint(Interval other) Does this start completely before other? Disjoint | |
| startsBeforeNonDisjoint | back to summary |
|---|---|
| public boolean startsBeforeNonDisjoint(Interval other) Does this start at or before other? Nondisjoint | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| union | back to summary |
|---|---|
| public Interval union(Interval other) Return the interval computed from combining this and other | |