|
sdr 0.7 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.cscott.sdr.calls.Timed<T>
public abstract class Timed<T extends Timed<T>>
Abstract superclass for TimedAction
, TimedPosition
, and
TimedFormation
, which pair a Action
, Position
, or
Formation
with a specific time at which it occurs.
Field Summary | |
---|---|
boolean |
isAbsolute
Whether times are absolute, or relative to the previous Timed . |
Fraction |
time
If isAbsolute is true, then the
absolute time at which this formation should appear. |
Constructor Summary | |
---|---|
protected |
Timed(Fraction time,
boolean isAbsolute)
|
Method Summary | ||
---|---|---|
int |
compareTo(T t)
Timed s are compared to each other on the basis
of their time fields. |
|
static
|
makeAbsolute(List<T> l)
Take a list of possibly-relative times and make them all absolute. |
|
abstract T |
makeAbsolute(Timed<?> reference)
Given a reference, make this Timed absolute. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Fraction time
isAbsolute
is true, then the
absolute time at which this formation should appear. Otherwise, the
relative amount of time after the previous Timed
at which this formation should appear.
public final boolean isAbsolute
Timed
.
Constructor Detail |
---|
protected Timed(Fraction time, boolean isAbsolute)
Method Detail |
---|
public int compareTo(T t) throws IllegalArgumentException
Timed
s are compared to each other on the basis
of their time
fields.
Earlier Timed
s are before later ones.
compareTo
in interface Comparable<T extends Timed<T>>
IllegalArgumentException
- if the position times are not
absolute.public abstract T makeAbsolute(Timed<?> reference)
Timed
absolute. Returns
this
if the Timed
is already absolute. A null
reference should be treated as one with an absolute time of zero.
reference
- The previous Timed
(must be absolute)public static <T extends Timed<T>> List<T> makeAbsolute(List<T> l)
|
sdr 0.7 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |