Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.huguesjohnson.tiamat
Class Sequence

    java.lang.Object
      com.huguesjohnson.tiamat.Sequence

All Implemented Interfaces:
  Storable

    public class Sequence

extends java.lang.Object
implements Storable

Sequence - class to represent a sequence

Author:
  Hugues Johnson

Constructor Summary
`Sequence(SequenceFrame[] frames, Event[] exitEvents)` Create a new instance of Sequence.

Method Summary
`void` | `addExitEvent(Event event)` Adds an exit event.
`void` | `addFrame(SequenceFrame frame)` Adds a frame.
`Event` | `getExitEvent(int index)` Returns the exit event at the specified index.
`int` | `getExitEventCount()` Returns the number of exit events in this sequence.
`Event[]` | `getExitEvents()` Returns All exit events in this sequence.
`SequenceFrame` | `getFrame(int index)` Returns the frame at the specified index.
`int` | `getFrameCount()` Returns the number of frames in this sequence.
`SequenceFrame[]` | `getFrames()` Returns All frames in this sequence.
`void` | `onDeserialize(Formatter formatter, java.lang.String absoluteDir)` The onDeserialize event should be fired after an object is de-serialized.
`void` | `removeExitEvent(int index)` Removes an exit event.
`void` | `removeFrame(int index)` Removes a frame.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Sequence

    public Sequence(SequenceFrame[] frames,
                    Event[] exitEvents)

  Create a new instance of Sequence.

  Parameters:
    `frames` - The frames in this sequence.
    `exitEvents` - The events to fire when this sequence is complete.

Method Detail

### getFrameCount

    public int getFrameCount()

  Returns the number of frames in this sequence.

  Returns:
    The number of frames in this sequence.

### addFrame

    public void addFrame(SequenceFrame frame)

  Adds a frame.

  Parameters:
    `frame` - The frame to add.

### removeFrame

    public void removeFrame(int index)

  Removes a frame.

  Parameters:
    `index` - The index of the frame to remove.

### getFrame

    public SequenceFrame getFrame(int index)

  Returns the frame at the specified index.

  Parameters:
    `index` - The index of the frame to get.
  Returns:
    The frame at the specified index, null if index<0 || index>length-1

### getFrames

    public SequenceFrame[] getFrames()

  Returns All frames in this sequence.

  Returns:
    All frames in this sequence.

### getExitEventCount

    public int getExitEventCount()

  Returns the number of exit events in this sequence.

  Returns:
    The number of exit events in this sequence.

### addExitEvent

    public void addExitEvent(Event event)

  Adds an exit event.

  Parameters:
    `event` - The exit event to add.

### removeExitEvent

    public void removeExitEvent(int index)

  Removes an exit event.

  Parameters:
    `index` - The index of the exit event to remove.

### getExitEvent

    public Event getExitEvent(int index)

  Returns the exit event at the specified index.

  Parameters:
    `index` - The index of the exit event to get.
  Returns:
    The exit event at the specified index, null if index<0 || index>length-1

### getExitEvents

    public Event[] getExitEvents()

  Returns All exit events in this sequence.

  Returns:
    All exit events in this sequence.

### onDeserialize

    public void onDeserialize(Formatter formatter,
                              java.lang.String absoluteDir)

  The onDeserialize event should be fired after an object is de-serialized. This allows objects to load transient members, set their working directory, and load Storable members if needed.

  Specified by:
    `onDeserialize` in interface `Storable`
  Parameters:
    `formatter` - the formatter to use to load any storable members
    `absoluteDir` - the working directory since all paths stored in the object should be relative

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD