S
- the (number-)type of the elements in this intervalpublic class Interval<S extends java.lang.Number> extends java.lang.Object implements NumberSet<S>
Modifier and Type | Field and Description |
---|---|
private NumberSet<S> |
intervalset |
private S |
lowerBound |
private S |
upperBound |
Constructor and Description |
---|
Interval(NumberSet<S> interval) |
Interval(S lower,
S upper) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(S e) |
boolean |
addAll(java.util.Collection<? extends S> c) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
NumberSet<S> |
getIntervalset() |
S |
getLowerBound() |
S |
getUpperBound() |
boolean |
isElementOf(S a)
checks, whether an element is within this interval
|
boolean |
isEmpty() |
java.util.Iterator<S> |
iterator() |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
void |
setIntervalset(NumberSet<S> intervalset) |
void |
setLowerBound(S lowerBound) |
void |
setUpperBound(S upperBound) |
int |
size() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
private void |
updateIntervallSetOnChange()
updates interval on changes of its lower or upper bounds
|
private S extends java.lang.Number lowerBound
private S extends java.lang.Number upperBound
public S getLowerBound()
public void setLowerBound(S lowerBound)
public S getUpperBound()
public void setUpperBound(S upperBound)
private void updateIntervallSetOnChange()
public boolean isElementOf(S a)
a
- public boolean add(S e)
public boolean addAll(java.util.Collection<? extends S> c)
public void clear()
public boolean contains(java.lang.Object o)
public boolean containsAll(java.util.Collection<?> c)
public boolean isEmpty()
public java.util.Iterator<S> iterator()
public boolean remove(java.lang.Object o)
public boolean removeAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public int size()
public java.lang.Object[] toArray()