xmto2xmta.timegraph
Class Time
java.lang.Object
|
+--xmto2xmta.timegraph.Time
- All Implemented Interfaces:
- java.lang.Comparable
- public class Time
- extends java.lang.Object
- implements java.lang.Comparable
Represents a point in time, and arithmetic operations on time.
History:
- 15 Mar 2001 - Created file.
Methods inherited from class java.lang.Object |
, clone, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait |
UNRESOLVED
public static java.lang.String UNRESOLVED
INDEFINITE
public static java.lang.String INDEFINITE
INFINITY
public static long INFINITY
INFINITY_STRING
private static java.lang.String INFINITY_STRING
ADD
private static final int ADD
SUBTRACT
private static final int SUBTRACT
MULTIPLY
private static final int MULTIPLY
resolved
private boolean resolved
indefinite
private boolean indefinite
value
private java.lang.Long value
Time
public Time(Time timeInstance)
Time
public Time(long value)
Time
public Time()
Time
public Time(java.lang.String special)
isResolved
public boolean isResolved()
isIndefinite
public boolean isIndefinite()
throws UnresolvedTimeException
isDefinite
public boolean isDefinite()
getValue
public long getValue()
throws UnresolvedTimeException,
IndefiniteTimeException
isEqual
public boolean isEqual(Time wrt)
isGreater
public boolean isGreater(Time wrt)
isGreaterEqual
public boolean isGreaterEqual(Time wrt)
isLess
public boolean isLess(Time wrt)
isLessEqual
public boolean isLessEqual(Time wrt)
setUnResolved
protected void setUnResolved()
setIndefinite
protected void setIndefinite()
setTime
public void setTime(java.lang.String special)
setTime
public void setTime(long value)
setTime
public void setTime(Time timeInstance)
add
private Time add(Time time)
subtract
private Time subtract(Time time)
multiply
private Time multiply(Time time)
arithmetic
private static Time arithmetic(Time time1,
Time time2,
int op)
add
public static Time add(Time time1,
Time time2)
subtract
public static Time subtract(Time time1,
Time time2)
multiply
public static Time multiply(Time time1,
Time time2)
add
public static Time add(Time time1,
long offset)
subtract
public static Time subtract(Time time1,
long offset)
multiply
public static Time multiply(Time time1,
float repeatCount)
- Multiply the given time by the repeat count.
The repeat count is a floating point number >= 0.
The Time value is a long integer that represents
milliseconds. This is why we need this special method.
Repeat count == -1 means it's an indefinite value.
min
public static Time min(java.util.Vector times)
max
public static Time max(java.util.Vector times)
remainder
public static Time remainder(Time time1,
Time time2)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
compareTo
public int compareTo(java.lang.Object object)
- Specified by:
compareTo
in interface java.lang.Comparable
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in class java.lang.Object