sdr 0.21

net.cscott.sdr.calls
Class TimedPosition

java.lang.Object
  extended by 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.
 
Constructor Summary
TimedPosition(Position position, Fraction time, boolean isAbsolute)
           
 
Method Summary
 int compareTo(TimedPosition o)
          TimedPositions are compared to each other on the basis of their time fields.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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.

Constructor Detail

TimedPosition

public TimedPosition(Position position,
                     Fraction time,
                     boolean isAbsolute)
Method Detail

compareTo

public int compareTo(TimedPosition o)
              throws IllegalArgumentException
TimedPositions are compared to each other on the basis of their time fields. Earlier TimedPositions are before later ones.

Specified by:
compareTo in interface Comparable<TimedPosition>
Throws:
IllegalArgumentException - if the position times are not absolute.

sdr 0.21

Copyright (c) 2006 C. Scott Ananian