Class SourcePhraseSet

java.lang.Object
org.jjazz.phrase.api.SourcePhraseSet

public class SourcePhraseSet extends Object
A set of phrases for different channels.

Some clientProperties can be attached.

  • Field Details

  • Constructor Details

    • SourcePhraseSet

      public SourcePhraseSet()
    • SourcePhraseSet

      public SourcePhraseSet(String id)
      Create an empty SourcePhraseSet and set the PROP_ID client property with the specified id.
      Parameters:
      id - Not used if null or empty string.
      See Also:
  • Method Details

    • getPhrase

      public SourcePhrase getPhrase(int channel)
      Get a the SourcePhrase for specified channel.
      Parameters:
      channel -
      Returns:
      Null if not set.
    • getSourceChannels

      public List<Integer> getSourceChannels()
      An ordered (ascending) list of channels for which there is a SourcePhrase.
      Returns:
    • setPhrase

      public void setPhrase(int channel, SourcePhrase sp)
      Associate a SourcePhrase for a specific channel.
      Parameters:
      channel -
      sp - If null then no SourcePhrase is set for the specified channel.
    • removeSourcePhrase

      public SourcePhrase removeSourcePhrase(int channel)
      Remove a SourcePhrase.
      Parameters:
      channel -
      Returns:
      The removed SourcePhrase, or null.
    • clear

      public void clear()
      Remove all the phrases.
    • setClientProperty

      public final void setClientProperty(String propName, String propValue)
      Set a client property to this object.
      Parameters:
      propName -
      propValue - If null, this removes the property.
    • getClientProperty

      public String getClientProperty(String propName)
      Get a client property.
      Parameters:
      propName -
      Returns:
      Null if property not set.