Package org.tweetyproject.math
Class Interval<S extends Number>
java.lang.Object
org.tweetyproject.math.Interval<S>
- Type Parameters:
S- the (number-)type of the elements in this interval
- All Implemented Interfaces:
Iterable<S>,Collection<S>,Set<S>,NumberSet<S>
This class contains a set of closed set (interval) of possible numbers
- Author:
- Bastian Wolf
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends S> c) voidclear()booleanbooleancontainsAll(Collection<?> c) Returns the lower boundbooleanisElementOf(S a) checks, whether an element is within this intervalbooleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) voidsetIntervalset(NumberSet<S> intervalset) voidsetLowerBound(S lowerBound) sets lower boundvoidsetUpperBound(S upperBound) intsize()Object[]toArray()<T> T[]toArray(T[] a) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
equals, hashCode, spliterator
-
Constructor Details
-
Interval
interval- Parameters:
interval- the interval to be constructed
-
Interval
interval- Parameters:
lower- lower boundupper- upper bound
-
-
Method Details
-
getLowerBound
Returns the lower bound- Returns:
- the lower bound
-
setLowerBound
sets lower bound- Parameters:
lowerBound- lower bound
-
getUpperBound
- Returns:
- upperBound
-
setUpperBound
- Parameters:
upperBound- the upper bound
-
getIntervalset
- Returns:
- interval set
-
setIntervalset
- Parameters:
intervalset- to be set
-
isElementOf
checks, whether an element is within this interval- Parameters:
a- some element- Returns:
- true iff a is an element of this interval
-
add
-
addAll
-
clear
public void clear() -
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<S extends Number>- Specified by:
containsAllin interfaceSet<S extends Number>
-
isEmpty
public boolean isEmpty() -
iterator
-
remove
-
removeAll
-
retainAll
-
size
public int size() -
toArray
-
toArray
public <T> T[] toArray(T[] a)
-