T - The data type used in the interval.  E.g. Double.public final class Interval<T extends Comparable> extends Object implements Comparable<T>
| Constructor and Description | 
|---|
Interval()  | 
Interval(T minimum,
        T maximum,
        IntervalEndPoint minimumEndPoint,
        IntervalEndPoint maximumEndPoint)
Initializes a new instance of an Interval. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
int | 
compareTo(T value) | 
boolean | 
contains(T value)
Determines whether a value is within this interval. 
 | 
boolean | 
equals(Object obj)  | 
T | 
getMaximum()
Gets the maximum interval value. 
 | 
IntervalEndPoint | 
getMaximumEndPoint()
Gets the end point type for the maximum value of the interval. 
 | 
T | 
getMinimum()
Gets the minimum interval value. 
 | 
IntervalEndPoint | 
getMinimumEndPoint()
Gets the end point type for the minimum value of the interval. 
 | 
int | 
hashCode()  | 
void | 
setMaximum(T value)
Sets the maximum interval value. 
 | 
void | 
setMaximumEndPoint(IntervalEndPoint value)
Sets the end point type for the maximum value of the interval. 
 | 
void | 
setMinimum(T value)
Sets the minimum interval value. 
 | 
void | 
setMinimumEndPoint(IntervalEndPoint value)
Sets the end point type for the minimum value of the interval. 
 | 
String | 
toString() | 
public Interval(T minimum, T maximum, IntervalEndPoint minimumEndPoint, IntervalEndPoint maximumEndPoint)
minimum - The minimum value in the interval.maximum - The maximum value in the interval.minimumEndPoint - The end point type for the minimum value.maximumEndPoint - The end point type for the maximum value.public Interval()
public T getMaximum()
public void setMaximum(T value)
value - The maximum value in the interval.public IntervalEndPoint getMaximumEndPoint()
public void setMaximumEndPoint(IntervalEndPoint value)
public T getMinimum()
public void setMinimum(T value)
value - The minimum value in the interval.public IntervalEndPoint getMinimumEndPoint()
public void setMinimumEndPoint(IntervalEndPoint value)
public boolean contains(T value)
value - The value to check.true if the value is contained in the interval, false otherwise.public int compareTo(T value)
compareTo in interface Comparable<T extends Comparable>Copyright © 2021. All rights reserved.