edu.iris.Fissures.model
Class TimeInterval

java.lang.Object
  extended by edu.iris.Fissures.Quantity
      extended by edu.iris.Fissures.model.QuantityImpl
          extended by edu.iris.Fissures.model.TimeInterval
All Implemented Interfaces:
java.io.Serializable, org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.portable.Streamable, org.omg.CORBA.portable.StreamableValue, org.omg.CORBA.portable.ValueBase

public class TimeInterval
extends QuantityImpl

TimeInterval.java Created: Wed Sep 1 20:23:31 1999

See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.iris.Fissures.model.QuantityImpl
format
 
Fields inherited from class edu.iris.Fissures.Quantity
the_units, value
 
Constructor Summary
TimeInterval(double f, UnitImpl the_unit)
          Creates a TimeInterval with the units and value.
TimeInterval(MicroSecondDate begin, MicroSecondDate end)
           
TimeInterval(edu.iris.Fissures.Quantity interval)
           
 
Method Summary
 TimeInterval add(TimeInterval t)
           
 QuantityImpl convertTo(UnitImpl newUnit)
          overrides covertTo() in QuantityImpl to return a TimeInterval instead of a QuantityImpl.
static TimeInterval createTimeInterval(edu.iris.Fissures.Quantity q)
          Creates a TimeInterval froma Quantity, making sure that the units are time.
 QuantityImpl divideBy(double f)
          overrides divideBy() in QuantityImpl to return a TimeInterval instead of a QuantityImpl.
 QuantityImpl multiplyBy(double f)
          overrides multiplyBy() in QuantityImpl to return a TimeInterval instead of a QuantityImpl.
 TimeInterval subtract(TimeInterval t)
           
 
Methods inherited from class edu.iris.Fissures.model.QuantityImpl
abs, add, createEmpty, createQuantityImpl, divideBy, equals, formatValue, get_unit, get_value, getUnit, getValue, getValue, greaterThan, greaterThanEqual, hashCode, inverse, lessThan, lessThanEqual, main, multiplyBy, setDecimalFormat, setFormat, setUnit, setValue, subtract, toString
 
Methods inherited from class edu.iris.Fissures.Quantity
_read, _truncatable_ids, _type, _write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeInterval

public TimeInterval(edu.iris.Fissures.Quantity interval)

TimeInterval

public TimeInterval(MicroSecondDate begin,
                    MicroSecondDate end)

TimeInterval

public TimeInterval(double f,
                    UnitImpl the_unit)
Creates a TimeInterval with the units and value.

Throws:
java.lang.IllegalArgumentException - if the units are not time.
Method Detail

createTimeInterval

public static TimeInterval createTimeInterval(edu.iris.Fissures.Quantity q)
Creates a TimeInterval froma Quantity, making sure that the units are time.

Throws:
java.lang.IllegalArgumentException - if the units are not time.

convertTo

public QuantityImpl convertTo(UnitImpl newUnit)
overrides covertTo() in QuantityImpl to return a TimeInterval instead of a QuantityImpl.

Overrides:
convertTo in class QuantityImpl

multiplyBy

public QuantityImpl multiplyBy(double f)
overrides multiplyBy() in QuantityImpl to return a TimeInterval instead of a QuantityImpl.

Overrides:
multiplyBy in class QuantityImpl

divideBy

public QuantityImpl divideBy(double f)
overrides divideBy() in QuantityImpl to return a TimeInterval instead of a QuantityImpl.

Overrides:
divideBy in class QuantityImpl

add

public TimeInterval add(TimeInterval t)

subtract

public TimeInterval subtract(TimeInterval t)