All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class guinea.logic.SequenceItem

java.lang.Object
   |
   +----guinea.logic.SequenceItem

public class SequenceItem
extends Object
implements Serializable
A sequence item is a sample name, pause length pair. The sample name indicates which sample is to be played and the pause is the length of pause between this sample and the next sequence item. The sequence items are used with a Sequence to play a fixed sequence of samples to the test subject.

See Also:
Sequence

Variable Index

· pause
The length of pause in either sample frames or seconds.
· PAUSE_FRAMES
The pause is in sample frames.
· PAUSE_SECONDS
The pause is in seconds.
· pauseType
Type of pause length, either in sample frames or seconds.
· sample
The sample ID of a sample.

Constructor Index

· SequenceItem(double, String)
Construct a new SequenceItem with a pause and sample.
· SequenceItem(int, String)
Construct a new SequenceItem with a pause and a sample.
· SequenceItem(String)
Construct a new SequenceItem with a sample.

Method Index

· getPauseType()
Get the type of the pause.
· getSample()
Get the name of the sample in this sequence item.
· main(String[])
· setSample(String)
Set the name of the sample in this sequence item.
· toString()
Get a string representation of this item.
· valueOf(String)
Returns a new SequenceItem object initialized to the value of the specified String.

Variables

· pause
 public double pause
The length of pause in either sample frames or seconds. The pauseType tells which it is.

See Also:
pauseType
· sample
 public String sample
The sample ID of a sample.

· PAUSE_FRAMES
 public static final int PAUSE_FRAMES
The pause is in sample frames.

See Also:
pauseType, pause
· PAUSE_SECONDS
 public static final int PAUSE_SECONDS
The pause is in seconds.

See Also:
pauseType, pause
· pauseType
 public int pauseType
Type of pause length, either in sample frames or seconds. Possible values are PAUSE_FRAMES and PAUSE_SECONDS

See Also:
pause

Constructors

· SequenceItem
 public SequenceItem(int frames,
                     String sample)
Construct a new SequenceItem with a pause and a sample.

Parameters:
frames - length of pause in sample frames.
sample - name of the sample
· SequenceItem
 public SequenceItem(double seconds,
                     String sample)
Construct a new SequenceItem with a pause and sample.

Parameters:
seconds - length of pause in seconds.
sample - name of the sample
· SequenceItem
 public SequenceItem(String sample)
Construct a new SequenceItem with a sample. Pause's length is 0.

Parameters:
sample - name of the sample

Methods

· getSample
 public String getSample()
Get the name of the sample in this sequence item.

Returns:
A sample name.
· setSample
 public void setSample(String sample)
Set the name of the sample in this sequence item.

Parameters:
sample - A sample name.
· getPauseType
 public int getPauseType()
Get the type of the pause.

Returns:
The type of the pause, either PAUSE_FRAMES or PAUSE_SECONDS.
See Also:
pauseType, PAUSE_FRAMES, PAUSE_SECONDS
· toString
 public String toString()
Get a string representation of this item.

Returns:
A string representation of the sequence item.
Overrides:
toString in class Object
· valueOf
 public static SequenceItem valueOf(String s) throws IllegalArgumentException
Returns a new SequenceItem object initialized to the value of the specified String. Throws an exception if the String cannot be parsed as a SequenceItem.

Parameters:
s - the string to be parsed.
Returns:
a newly constructed SequenceItem initialized to the value represented by the string argument.
Throws: IllegalArgumentException
An exception is thrown if the string doesn't represent a valid SequenceItem.
· main
 public static void main(String args[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index