|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjasi.sim.basic.value.AbstractSimValueType
jasi.sim.basic.value.AbstractComparableObject<Time>
jasi.sim.basic.value.Time
public class Time
Simulation time. This class represents an immutable simulation time.
Field Summary | |
---|---|
static java.util.Comparator<Time> |
COMPARATOR
The time comparator. |
static Time |
D
Time constant for a day. |
static Time |
H
Time constant for an hour. |
static Time |
M
Time constant for a minute. |
static Time |
MS
Time constant for a millisecond. |
static Time |
NEVER
Time constant for infinite time. |
static Time |
S
Time constant for a second. |
static Time |
ZERO
Time constant for zero time. |
Constructor Summary | |
---|---|
Time(java.lang.String time)
Constructor. |
|
Time(Time time)
Constructor. |
Method Summary | |
---|---|
Time |
add(Time t)
Add that time to this time. |
double |
amount(Time time)
Retrieve the amount of this time in units of that time. |
int |
compareTo(Time t)
Compares this object with the specified object for order. |
static Time |
create(java.lang.String time)
Factory for a time object. |
boolean |
equals(java.lang.Object o)
Indicates, whether some other object is "equal to" this one. |
int |
hashCode()
Returns a hash code value for the object. |
Time |
minus(Time t)
Subtract that time from this time. |
Time |
times(double f)
Multiply this time object by a factor. |
Time |
times(long f)
Multiply this time object by a factor. |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class jasi.sim.basic.value.AbstractComparableObject |
---|
isEQ, isGE, isGT, isLE, isLT, isNE |
Methods inherited from class jasi.sim.basic.value.AbstractSimValueType |
---|
getContent |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.Comparator<Time> COMPARATOR
public static final Time ZERO
public static final Time MS
public static final Time S
public static final Time M
public static final Time H
public static final Time D
public static final Time NEVER
Constructor Detail |
---|
public Time(Time time)
time
- A time object.public Time(java.lang.String time)
time
- The string representation of a time object.Method Detail |
---|
public static Time create(java.lang.String time)
time
- The string representation of a time object.
public double amount(Time time)
time
- That time object.
public java.lang.String toString()
toString
in class java.lang.Object
public Time add(Time t)
t
- That time.
public Time minus(Time t)
t
- That time.
public Time times(double f)
f
- The multiplication factor.
public Time times(long f)
f
- The multiplication factor.
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- That object which is compared with this object.
public int compareTo(Time t)
compareTo
in interface java.lang.Comparable<Time>
compareTo
in class AbstractComparableObject<Time>
t
- That time which is compared with this object.
Comparable.compareTo(Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |