Package net.sf.tweety.math
Class Interval<S extends java.lang.Number>
- java.lang.Object
-
- net.sf.tweety.math.Interval<S>
-
- Type Parameters:
S
- the (number-)type of the elements in this interval
- All Implemented Interfaces:
java.lang.Iterable<S>
,java.util.Collection<S>
,java.util.Set<S>
,NumberSet<S>
public class Interval<S extends java.lang.Number> extends java.lang.Object implements NumberSet<S>
This class contains a set of closed set (interval) of possible numbers- Author:
- Bastian Wolf
-
-
Method Summary
Modifier and Type Method 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()
Returns the lower boundS
getUpperBound()
boolean
isElementOf(S a)
checks, whether an element is within this intervalboolean
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)
-
-
-
Method Detail
-
getLowerBound
public S getLowerBound()
Returns the lower bound- Returns:
- the lower bound
-
setLowerBound
public void setLowerBound(S lowerBound)
-
getUpperBound
public S getUpperBound()
-
setUpperBound
public void setUpperBound(S upperBound)
-
isElementOf
public boolean isElementOf(S a)
checks, whether an element is within this interval- Parameters:
a
- some element- Returns:
- true iff a is an element of this interval
-
add
public boolean add(S e)
-
addAll
public boolean addAll(java.util.Collection<? extends S> c)
-
clear
public void clear()
-
contains
public boolean contains(java.lang.Object o)
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
-
isEmpty
public boolean isEmpty()
-
iterator
public java.util.Iterator<S> iterator()
-
remove
public boolean remove(java.lang.Object o)
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
-
size
public int size()
-
toArray
public java.lang.Object[] toArray()
-
-