net.cscott.sdr.calls
Class TimedPosition
java.lang.Object
net.cscott.sdr.calls.TimedPosition
- All Implemented Interfaces:
- Comparable<TimedPosition>
public class TimedPosition
- extends Object
- implements Comparable<TimedPosition>
A TimedPosition
combines a Position
with
a timestamp indicating when that particular position
should be reached. The timestamp is always absolute.
- Version:
- $Id: TimedPosition.java,v 1.3 2006-10-27 05:14:34 cananian Exp $
- Author:
- C. Scott Ananian
Field Summary |
boolean |
isAbsolute
Whether times are absolute, or relative to the previous
TimedPosition . |
Position |
position
The dancer position called for at the given time. |
Fraction |
time
If isAbsolute is true, then the
absolute time at which this formation should appear. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
position
public final Position position
- The dancer position called for at the given time.
time
public final Fraction time
- If
isAbsolute
is true, then the
absolute time at which this formation should appear. Otherwise, the
relative amount of time after the previous TimedPosition
at which this formation should appear.
isAbsolute
public final boolean isAbsolute
- Whether times are absolute, or relative to the previous
TimedPosition
.
TimedPosition
public TimedPosition(Position position,
Fraction time,
boolean isAbsolute)
compareTo
public int compareTo(TimedPosition o)
throws IllegalArgumentException
TimedPosition
s are compared to each other on the basis
of their time
fields.
Earlier TimedPosition
s are before later ones.
- Specified by:
compareTo
in interface Comparable<TimedPosition>
- Throws:
IllegalArgumentException
- if the position times are not
absolute.
Copyright (c) 2006 C. Scott Ananian