Package org.jjazz.phrase.api
Class SourcePhraseSet
java.lang.Object
org.jjazz.phrase.api.SourcePhraseSet
A set of phrases for different channels.
Some clientProperties can be attached.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate an empty SourcePhraseSet and set the PROP_ID client property with the specified id. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Remove all the phrases.getClientProperty(String propName) Get a client property.getPhrase(int channel) Get a the SourcePhrase for specified channel.An ordered (ascending) list of channels for which there is a SourcePhrase.removeSourcePhrase(int channel) Remove a SourcePhrase.final voidsetClientProperty(String propName, String propValue) Set a client property to this object.voidsetPhrase(int channel, SourcePhrase sp) Associate a SourcePhrase for a specific channel.
-
Field Details
-
PROP_ID
- See Also:
-
-
Constructor Details
-
SourcePhraseSet
public SourcePhraseSet() -
SourcePhraseSet
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
Get a the SourcePhrase for specified channel.- Parameters:
channel-- Returns:
- Null if not set.
-
getSourceChannels
An ordered (ascending) list of channels for which there is a SourcePhrase.- Returns:
-
setPhrase
Associate a SourcePhrase for a specific channel.- Parameters:
channel-sp- If null then no SourcePhrase is set for the specified channel.
-
removeSourcePhrase
Remove a SourcePhrase.- Parameters:
channel-- Returns:
- The removed SourcePhrase, or null.
-
clear
public void clear()Remove all the phrases. -
setClientProperty
Set a client property to this object.- Parameters:
propName-propValue- If null, this removes the property.
-
getClientProperty
Get a client property.- Parameters:
propName-- Returns:
- Null if property not set.
-