|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.orekit.utils.GenericInterval<T>
org.orekit.utils.ComparableInterval<T>
T - the nature of ending points. Must implement java.lang.Comparablepublic class ComparableInterval<T extends Comparable<T>>
- Class describing an interval of Comparable data.
- The upper and lower boundaries have to be Comparable, so that the correct order can be checked.
- This class can be extended ; toString may be overriden.
For instance, an interval of Doubles ]1.0,2.0[ is created this way :
Interval
| Constructor Summary | |
|---|---|
ComparableInterval(IntervalEndpointType lowerEndpointIn,
T lowerDataIn,
T upperDataIn,
IntervalEndpointType upperEndpointIn)
Constructor. The input parameters have to be not null. The lower and upper endpoints also have to be properly ordered. Otherwise a MathIllegalArgumentException is thrown. |
|
| Method Summary | |
|---|---|
int |
compareLowerEndTo(ComparableInterval<T> interval)
Compares the lower end point with the lower end point of the given interval. |
int |
compareTo(ComparableInterval<T> interval)
Compares this interval with the specified interval. |
int |
compareUpperEndTo(ComparableInterval<T> interval)
Compares the upper end point with the upper end point of the given interval. |
boolean |
contains(Comparable<T> cmp)
Returns true when the value belongs to the interval. |
boolean |
equals(Object interval)
Checks if the instance represents the same ComparableInterval as another instance. |
int |
hashCode()
|
boolean |
includes(ComparableInterval<T> interval)
Returns true when this interval includes the other. |
boolean |
isConnectedTo(ComparableInterval<T> interval)
Returns true when the lower point coincides with the upper point of the input interval, and one of the two points is closed (and the other one is open). |
boolean |
overlaps(ComparableInterval<T> interval)
Returns true when the two intervals overlap. |
| Methods inherited from class org.orekit.utils.GenericInterval |
|---|
getLowerData, getLowerEndpoint, getUpperData, getUpperEndpoint, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ComparableInterval(IntervalEndpointType lowerEndpointIn,
T lowerDataIn,
T upperDataIn,
IntervalEndpointType upperEndpointIn)
MathIllegalArgumentException is thrown.
lowerDataIn - lower end data valueupperDataIn - upper end data valuelowerEndpointIn - lower end point stateupperEndpointIn - upper end point state
MathIllegalArgumentException - when the interval is invalid (unchecked exception)| Method Detail |
|---|
public final boolean contains(Comparable<T> cmp)
cmp - the tested value
public final boolean overlaps(ComparableInterval<T> interval)
interval - the other interval
public final boolean includes(ComparableInterval<T> interval)
interval - the interval tested for inclusion
public final boolean isConnectedTo(ComparableInterval<T> interval)
interval - the interval tested for connection
public final int compareLowerEndTo(ComparableInterval<T> interval)
interval - the interval tested for lower end point comparison
public final int compareUpperEndTo(ComparableInterval<T> interval)
interval - the interval tested for upper end point comparison
public int compareTo(ComparableInterval<T> interval)
compareTo in interface Comparable<ComparableInterval<T extends Comparable<T>>>interval - the time interval to be compared.
ClassCastException - if the specified object's type prevents it
from being compared to this object.public boolean equals(Object interval)
ComparableInterval as another instance.
equals in class Objectinterval - other interval
public int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||