All Packages Class Hierarchy This Package Previous Next Index
Class ejmf.toolkit.multiplayer.MixerEvent
java.lang.Object
|
+----ejmf.toolkit.multiplayer.MixerEvent
- public class MixerEvent
- extends Object
- implements Sortable
A MixerEvent encapsulates a time-based operation
on a Player.
A MixerEvent maintains a pair: time and command.
The command is executed at the specified time offset.
The time represents the offset from some arbitrary start
time. The command is an instance of MixerCommand.
MixerEvent implements the Sortable interface so that
a collection of them can be easily sort according to their
time offset.
- See Also:
- MixerCommand, Track
-
MixerEvent(MixerCommand, long)
- Create a MixerEvent specifying its command/time pair
completely.
-
execute()
- Execute the command associated with MixerEvent
-
getCommand()
- Get the MixerCommand associated with this
MixerEvent.
-
getTime()
- Get the time offset at which this MixerEvent's
command is to be executed.
-
lessThan(Sortable)
- Determine whether this MixerEvent's command is executed
before another MixerEvent's command.
-
setTime(long)
- Set the time offset at which this MixerEvent's
command is to be executed.
MixerEvent
public MixerEvent(MixerCommand cmd,
long time)
- Create a MixerEvent specifying its command/time pair
completely. Time is offset from arbitrary start time.
- Parameters:
- cmd - MixerCommand command to be executed at given time
- time - Time, in milliseconds at which command is executed.
setTime
public void setTime(long time)
- Set the time offset at which this MixerEvent's
command is to be executed.
- Parameters:
- time - Time, in milliseconds at which command is executed.
getTime
public long getTime()
- Get the time offset at which this MixerEvent's
command is to be executed.
- Returns:
- Command execution offset.
lessThan
public boolean lessThan(Sortable s)
- Determine whether this MixerEvent's command is executed
before another MixerEvent's command. This method implements
Sortable interface required by quick sort. It tests if
if this event's time offset is smaller than one passed as
argument.
- Parameters:
- s - a Sortable
- See Also:
- Sortable, QuickSort
getCommand
public MixerCommand getCommand()
- Get the MixerCommand associated with this
MixerEvent.
- Returns:
- A MixerCommand associated with this event.
execute
public void execute()
- Execute the command associated with MixerEvent
All Packages Class Hierarchy This Package Previous Next Index