| Package | Description |
|---|---|
| org.nerd4j.utils.math |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Comparable<T>> |
Interval.closed(T inf,
T sup)
Creates a new closed
Interval with the given limits. |
static <T extends Comparable<T>> |
Interval.closedInf(T value)
Creates a new
Interval with a closed inferior
limit and an unbounded superior limit. |
static <T extends Comparable<T>> |
Interval.closedOpen(T inf,
T sup)
Creates a new
Interval with a closed inferior limit
and an open superior limit. |
static <T extends Comparable<T>> |
Interval.closedSup(T value)
Creates a new
Interval with a closed superior
limit and an unbounded inferior limit. |
static <T extends Comparable<T>> |
Interval.empty()
Returns the singleton instance of the "empty set"
Interval. |
Interval<T> |
Interval.intersect(Interval<T> other)
Returns an interval containing only those
elements that belongs to both this interval
and the given one.
|
static <T extends Comparable<T>> |
Interval.open(T inf,
T sup)
Creates a new open
Interval with the given limits. |
static <T extends Comparable<T>> |
Interval.openClosed(T inf,
T sup)
Creates a new
Interval with an open inferior limit
and a closed superior limit. |
static <T extends Comparable<T>> |
Interval.openInf(T value)
Creates a new
Interval with a open inferior
limit and an unbounded superior limit. |
static <T extends Comparable<T>> |
Interval.openSup(T value)
Creates a new
Interval with a open superior
limit and an unbounded inferior limit. |
Interval<T> |
Interval.subtract(Interval<T> other)
Returns an interval containing only those
elements that belongs to this interval
but not to the given one.
|
static <T extends Comparable<T>> |
Interval.unbounded()
Returns the singleton instance of an unbounded
Interval. |
Interval<T> |
Interval.unify(Interval<T> other)
Returns an interval containing those elements
that belongs to at least one between this interval
and the given one.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
Interval.canSubtract(Interval<T> other)
Tells if the given interval can be subtracted from this one.
|
boolean |
Interval.canUnify(Interval<T> other)
Tells if this interval can be unified with the given one.
|
boolean |
Interval.includes(Interval<T> other)
Tells if this interval includes the given one.
|
Interval<T> |
Interval.intersect(Interval<T> other)
Returns an interval containing only those
elements that belongs to both this interval
and the given one.
|
boolean |
Interval.isConsecutiveTo(Interval<T> other)
Tells if this interval is consecutive to the given one.
|
boolean |
Interval.isDisjointFrom(Interval<T> other)
Tells if this interval is disjoint frp, the given one.
|
boolean |
Interval.isStrictlyConsecutiveTo(Interval<T> other)
This is a strict version of the
isConsecutiveTo(Interval)
method where a further check is made to ensure that the two
intervals are not overlapping. |
boolean |
Interval.overlaps(Interval<T> other)
Tells if this interval overlaps the given one.
|
Interval<T> |
Interval.subtract(Interval<T> other)
Returns an interval containing only those
elements that belongs to this interval
but not to the given one.
|
Interval<T> |
Interval.unify(Interval<T> other)
Returns an interval containing those elements
that belongs to at least one between this interval
and the given one.
|
| Constructor and Description |
|---|
NoSuchIntervalException(Interval<?> a,
Interval<?> b,
String op)
Constructs a new exception to report a failed union between
the two provided intervals.
|
NoSuchIntervalException(Interval<?> a,
Interval<?> b,
String op)
Constructs a new exception to report a failed union between
the two provided intervals.
|
Copyright © 2011–2020 Nerd4j. All rights reserved.