All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class guinea.logic.Sequence

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

public class Sequence
extends Object
implements Serializable
A sequence is a list of samples and optional pauses between samples. Sequences are used to play a fixed sample sequence to the test subject. A sequence is a list of sequence items that define sample names and a optional pause. Java's Vector is used to store the sequence items.

See Also:
SequenceItem

Constructor Index

· Sequence()
Construct a new empty sequence.

Method Index

· addSequenceItem(int, String)
Add a sequence item to the end of the sequence.
· addSequenceItem(SequenceItem)
Add a sequence item to the end of the sequence.
· addSequenceItem(String)
Add a sequence item to the end of the sequence.
· elements()
Get sequence items of the sequence as an enumeration.
· main(String[])
· sequenceItemAt(int)
Get a sequence item from the sequence.
· size()
Get number of sequence items in the sequence.
· toString()
Get a string representation of this item.
· valueOf(String)
Returns a new Sequence object initialized to the value of the specified String.

Constructors

· Sequence
 public Sequence()
Construct a new empty sequence.

Methods

· elements
 public Enumeration elements()
Get sequence items of the sequence as an enumeration.

Returns:
An Enumeration of sequence items.
See Also:
elements
· sequenceItemAt
 public SequenceItem sequenceItemAt(int index)
Get a sequence item from the sequence.

Parameters:
index - The index of sequence item to get.
Returns:
A sequence item.
See Also:
elementAt
· size
 public int size()
Get number of sequence items in the sequence.

Returns:
Number of sequence items in the sequence.
See Also:
size
· addSequenceItem
 public void addSequenceItem(SequenceItem si)
Add a sequence item to the end of the sequence.

Parameters:
si - A sequence item.
See Also:
addElement
· addSequenceItem
 public SequenceItem addSequenceItem(String sample)
Add a sequence item to the end of the sequence. A new sequence item is created with the given sample ID.

Parameters:
sample - Sample ID to use in new sequence item.
Returns:
A new sequence item added to the sequence.
· addSequenceItem
 public SequenceItem addSequenceItem(int pause,
                                     String sample)
Add a sequence item to the end of the sequence. A new sequence item is created with the given sample ID and pause.

Parameters:
sample - Sample ID to use in new sequence item.
pause - The length of pause for new sequence item.
Returns:
A new sequence item added to the sequence.
· toString
 public String toString()
Get a string representation of this item. The string can be parsed back to a Sequence with valueOf().

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

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

All Packages  Class Hierarchy  This Package  Previous  Next  Index