Class RpValueCopyBuffer

java.lang.Object
org.jjazz.ss_editor.api.RpValueCopyBuffer

public class RpValueCopyBuffer extends Object
Singleton class to manage RhythmParameter values copy/paste operations.

Values must come from the same RhythmParameter.

  • Method Details

    • getInstance

      public static RpValueCopyBuffer getInstance()
    • put

      public <E> void put(Rhythm r, RhythmParameter<E> rp, List<E> values)
      Put the RhythmParameter and a copy of the values in the buffer.

      Type Parameters:
      E -
      Parameters:
      r -
      rp -
      values - RhythmParameter values
    • clear

      public void clear()
    • getSize

      public int getSize()
      Returns:
      int The nb of RhyhmParts in the buffer.
    • isEmpty

      public boolean isEmpty()
    • getRhythmParameter

      public RhythmParameter<?> getRhythmParameter()
      The RhythmParameter for which the buffer stores values.
      Returns:
      Null if buffer is empty
    • getRhythm

      public Rhythm getRhythm()
      The Rhythm of the RhythmParameter.
      Returns:
      Null if buffer is empty
    • get

      public List<Object> get()
      Return the values in the buffer.

      Returns:
      A list of copies of the values stored in the buffer
    • addChangeListener

      public void addChangeListener(ChangeListener cl)
    • removeChangeListener

      public void removeChangeListener(ChangeListener cl)
    • toString

      public String toString()
      Overrides:
      toString in class Object