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

Field Summary
protected  Object lower
           
protected  Object upper
           
 
Constructor Summary
Interval(Object min, Object max)
          Construct an interval of orderable objects.
Interval(Object min, Object max, Comparator com)
          Constructs an interval of orderable objects.
 
Method Summary
 boolean contains(Interval i)
           
 boolean containsValue(Object o)
           
 boolean equals(Object o)
           
 Object getLowerBound()
          Returns the minimum bound.
 Object getUpperBound()
          Returns the maximum bound.
protected static Object quotify(Object obj)
           
 void setBounds(Object a, Object b)
           
 void setLowerBound(Object min)
           
 void setUpperBound(Object max)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lower

protected Object lower

upper

protected Object upper
Constructor Detail

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
Method Detail

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)