arom.util
Class Interval
java.lang.Object
|
+--arom.util.Interval
- Direct Known Subclasses:
- AromInterval
- public class Interval
- extends Object
This class represents an interval of orderable objects.
- Version:
- 0.1
lower
protected Object lower
upper
protected Object upper
Interval
public Interval(Object min,
Object max,
Comparator com)
- Constructs an interval of orderable objects. The two first arguments
are the bounds of the newly created interval, and the third one is the comparison
fonction that impose an order on this objects.
- Parameters:
min - the minimum bound.max - the maximum bound.com - the comparison fonction.
Interval
public Interval(Object min,
Object max)
- Construct an interval of orderable objects. The two parameters defined the
bounds of this interval and must implements the
Comparable interface.
- Parameters:
min - a value of type 'Object'max - a value of type 'Object'- See Also:
Comparable
quotify
protected static Object quotify(Object obj)
toString
public String toString()
- Overrides:
- toString in class Object
getLowerBound
public Object getLowerBound()
- Returns the minimum bound.
- Returns:
- the minimum bound.
getUpperBound
public Object getUpperBound()
- Returns the maximum bound.
- Returns:
- the maximum bound.
setLowerBound
public void setLowerBound(Object min)
setUpperBound
public void setUpperBound(Object max)
setBounds
public void setBounds(Object a,
Object b)
equals
public boolean equals(Object o)
- Overrides:
- equals in class Object
contains
public boolean contains(Interval i)
containsValue
public boolean containsValue(Object o)