sdr 0.21

net.cscott.sdr.calls
Class TimedFormation

java.lang.Object
  extended by net.cscott.sdr.calls.TimedFormation
All Implemented Interfaces:
Comparable<TimedFormation>

public class TimedFormation
extends Object
implements Comparable<TimedFormation>

A TimedFormation combines a Formation with a timestamp indicating when that particular formation should be reached. Timestamps can be either absolute or relative.

Version:
$Id: TimedFormation.java,v 1.2 2006-10-26 17:30:25 cananian Exp $
Author:
C. Scott Ananian

Field Summary
 Formation formation
          The dancer formation called for at the given time.
 boolean isAbsolute
          Whether times are absolute, or relative to the previous TimedFormation.
 Fraction time
          If isAbsolute is true, then the absolute time at which this formation should appear.
 
Constructor Summary
TimedFormation(Formation formation, Fraction time, boolean isAbsolute)
           
 
Method Summary
 int compareTo(TimedFormation o)
          TimedFormations 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

formation

public final Formation formation
The dancer formation 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 TimedFormation at which this formation should appear.


isAbsolute

public final boolean isAbsolute
Whether times are absolute, or relative to the previous TimedFormation.

Constructor Detail

TimedFormation

public TimedFormation(Formation formation,
                      Fraction time,
                      boolean isAbsolute)
Method Detail

compareTo

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

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

sdr 0.21

Copyright (c) 2006 C. Scott Ananian