sky.monome.sequence
Class SwingSequenceIterator<S extends Sequencer<S,B>,B extends ButtonManager<B>>

java.lang.Object
  extended by sky.monome.sequence.SwingSequenceIterator<S,B>
Type Parameters:
S - Type of sequencers that use these sequence iterators.
B - Type of button managers used by the sequencers that use these sequence iterators.
All Implemented Interfaces:
SequenceIterator<S,B>

public class SwingSequenceIterator<S extends Sequencer<S,B>,B extends ButtonManager<B>>
extends java.lang.Object
implements SequenceIterator<S,B>

Iterator over a sequencer's sequence which progresses with a kind of "swing". It goes two steps positively and one step negatively.

Since:
SkyMonome v1.1
Author:
PJ Skyman

Field Summary
protected  boolean upward
          Indicates whether the iterator is currently progressing upwardly or backwardly.
 
Constructor Summary
SwingSequenceIterator()
          Constructs a swing sequence iterator.
 
Method Summary
 int getNextStep(S sequencer)
          Returns the next step number for the specified sequencer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

upward

protected boolean upward
Indicates whether the iterator is currently progressing upwardly or backwardly.

Constructor Detail

SwingSequenceIterator

public SwingSequenceIterator()
Constructs a swing sequence iterator.

Method Detail

getNextStep

public int getNextStep(S sequencer)
Returns the next step number for the specified sequencer.

Specified by:
getNextStep in interface SequenceIterator<S extends Sequencer<S,B>,B extends ButtonManager<B>>
Parameters:
sequencer - Sequencer which demands the next step.
Returns:
The next step number for the specified sequencer.