T
- the nature of ending points.public class GenericInterval<T> extends Object implements Serializable
- Generic class to describe an interval.
- The generic element is the nature of the data defining the upper and lower boundaries.
- This class can be extended ; toString may be overriden.
An interval of Doubles ] 1.0 ; 2.0 [ is created this way :
Interval
Constructor and Description |
---|
GenericInterval(IntervalEndpointType lowerEndpointIn,
T lowerDataIn,
T upperDataIn,
IntervalEndpointType upperEndpointIn)
Constructor.
The input parameters have to be not null. Otherwise a MathIllegalArgumentException is thrown. |
Modifier and Type | Method and Description |
---|---|
T |
getLowerData() |
IntervalEndpointType |
getLowerEndpoint() |
T |
getUpperData() |
IntervalEndpointType |
getUpperEndpoint() |
String |
toString()
This method returns a String representing the interval, with boundaries as brackets and the
lower/upper values.
Example : "] 0.0 , 1.2534 [" for an open interval with doubles. toString is called on the values. Warning : this representation is subject to change. This method may be overriden if convenient. |
public GenericInterval(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 stateMathIllegalArgumentException
- when the interval is invalid (unchecked exception)public final IntervalEndpointType getLowerEndpoint()
public final T getLowerData()
public final T getUpperData()
public final IntervalEndpointType getUpperEndpoint()
public String toString()
toString
in class Object
Object.toString()
Copyright © 2023 CNES. All rights reserved.