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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends S> c) void
clear()
boolean
boolean
containsAll
(Collection<?> c) Returns the lower boundboolean
isElementOf
(S a) checks, whether an element is within this intervalboolean
isEmpty()
iterator()
boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) void
setIntervalset
(NumberSet<S> intervalset) void
setLowerBound
(S lowerBound) sets lower boundvoid
setUpperBound
(S upperBound) int
size()
Object[]
toArray()
<T> T[]
toArray
(T[] a) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods 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:
containsAll
in interfaceCollection<S extends Number>
- Specified by:
containsAll
in interfaceSet<S extends Number>
-
isEmpty
public boolean isEmpty() -
iterator
-
remove
-
removeAll
-
retainAll
-
size
public int size() -
toArray
-
toArray
public <T> T[] toArray(T[] a)
-