model.cue
Class CueSet

java.lang.Object
  extended by model.cue.CueSet

public class CueSet
extends Object

This class holds a set of cues.


Constructor Summary
CueSet(ACue[] cues)
          This constructor creates a new cueset with the given cues in it.
CueSet(int _maxChannels)
          This constructor creates a new cueset with only the empty cue #0 in it.
 
Method Summary
 void addCue(ACue cue)
          This method adds a cue to the cueset.
 void addCues(ACue[] cues)
          This method adds a series of cues to the set.
 void deleteCue(float number)
          This method will delete the cue with the given number.
 void deleteCues(float[] numbers)
          This method will delete the cues with the given numbers.
static CueSet extractFile(String data, int cueMaxChannels)
          This method takes the saved file data and will return a cueset.
 ACue getCue(float number)
          This method returns the cue with the given cue number.
 String[] getCueNames()
          This method will return the summary of all the cues.
 Float[] getCueNumbers()
          This method will return all the cue numbers.
 ACue[] getCues()
          This method will return all the cues in the cueset.
 ACue[] getCues(float[] numbers)
          This method returns a series of cues with the given numbers.
 String getFileData()
          This method returns all the data for this cueset so that it can be saved to a file.
 float getHighestCueNumber()
          This method returns the highest cue number that exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CueSet

public CueSet(int _maxChannels)
This constructor creates a new cueset with only the empty cue #0 in it.

Parameters:
_maxChannels - The maximum number of channels for this cueset.

CueSet

public CueSet(ACue[] cues)
This constructor creates a new cueset with the given cues in it.

Parameters:
cues - The array of cues to add to the set.
Method Detail

addCue

public void addCue(ACue cue)
This method adds a cue to the cueset. If you try to add an cue that already exists to the set, the existing cue will be replaced.

Parameters:
cue - The cue to add to the cueset.

addCues

public void addCues(ACue[] cues)
This method adds a series of cues to the set.

Parameters:
cues - The array of cues to add to the cueset.

getCue

public ACue getCue(float number)
This method returns the cue with the given cue number.

Parameters:
number - The number of the cue you want to receive.
Returns:
The cue with the given number.

getCues

public ACue[] getCues(float[] numbers)
This method returns a series of cues with the given numbers.

Parameters:
numbers - The numbers of the cues you want to receive.
Returns:
The array of cues with the given numbers.

getCues

public ACue[] getCues()
This method will return all the cues in the cueset.

Returns:
The array containing all the cues in this set.

deleteCue

public void deleteCue(float number)
This method will delete the cue with the given number.

Parameters:
number - The number of the cue you want to delete.

deleteCues

public void deleteCues(float[] numbers)
This method will delete the cues with the given numbers.

Parameters:
The - array containing the cue numbers you want to delete.

getCueNumbers

public Float[] getCueNumbers()
This method will return all the cue numbers.

Returns:
The array containing all the cue numbers.

getCueNames

public String[] getCueNames()
This method will return the summary of all the cues.

TODO: Rename this method from getCueNames() to getCueSummaries()

Returns:
The array containing the summary of every cue in the set.

getHighestCueNumber

public float getHighestCueNumber()
This method returns the highest cue number that exists.

Returns:
The highest cue number that currently exists.

getFileData

public String getFileData()
This method returns all the data for this cueset so that it can be saved to a file. The data is returned in an XML format.

Returns:
The data for this cueset.

extractFile

public static CueSet extractFile(String data,
                                 int cueMaxChannels)
This method takes the saved file data and will return a cueset.

Parameters:
data - The cueset data from the saved file.
cueMaxChannels - The maximum number of channels for the cue.
Returns:
The cueset representing the given data.