|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.expasy.jpl.commons.collection.Interval
public final class Interval
An interval is a set of numbers with the property that any number that lies between two numbers is included in the set. An interval is said to be opened ("[]"), closed ("][")or semi-opened ("[[" or "]]") depending on the possible inclusion of bounds. For example, the set of all numbers x satisfying 0 ≤ x < 1 is a semi-opened interval [0, 1[ which contains 0 and not 1, as well as all real numbers between them.
| Nested Class Summary | |
|---|---|
static class |
Interval.Builder
|
static class |
Interval.IntervalComparator
|
static class |
Interval.IntervalOverlapException
|
static class |
Interval.OverlapFinder
|
| Method Summary | |
|---|---|
Interval |
clone()
duplicate the object |
boolean |
contains(Number number)
Return true if the given number is found in this interval. |
static Interval |
emptyInstance()
|
double |
getCenter()
Get the center value. |
double |
getLowerBound()
Get the lower bound number (included). |
int |
getPrecision()
|
double |
getRange()
|
double |
getUpperBound()
Get the upper bound number (excluded). |
boolean |
hasOverlap(Interval i)
|
boolean |
isEmpty()
|
boolean |
isLowerBoundIncluded()
|
boolean |
isUpperBoundIncluded()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static Interval emptyInstance()
public Interval clone()
ExplicitlyCloneable
clone in interface ExplicitlyCloneableclone in class Objectpublic final double getLowerBound()
public final double getUpperBound()
public final double getCenter()
public final boolean isLowerBoundIncluded()
public final boolean isUpperBoundIncluded()
public boolean contains(Number number)
this interval.
contains in interface DomainOfDefinition<Number>number - the number to test in interval.
public double getRange()
public int getPrecision()
public boolean isEmpty()
public boolean hasOverlap(Interval i)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||