Package org.jjazz.rhythmstubs.api
Class DummyRhythm
java.lang.Object
org.jjazz.rhythmstubs.api.DummyRhythm
- All Implemented Interfaces:
Comparable<Rhythm>,Rhythm
A dummy rhythm which does nothing.
-
Field Summary
Fields inherited from interface org.jjazz.rhythm.api.Rhythm
PROP_RESOURCES_LOADED -
Constructor Summary
ConstructorsConstructorDescriptionDummyRhythm(String name, TimeSignature ts) Create a dummy rhythm for specified time signature. -
Method Summary
Modifier and TypeMethodDescriptionvoidintCompare alphabetically on the rhythm's name.booleanThe general features of this rhythm.getFile()Optional file from which this rhythm was loaded.getName()intList<RhythmParameter<?>>String[]getTags()Can be any keyword strings used to describe the rhythm.A unique string identifier representing this rhythm.inthashCode()booleanvoidTell the rhythm it may load any memory-heavy resources.voidThis implementation does nothing.voidtoString()Methods inherited from interface org.jjazz.rhythm.api.Rhythm
getVersion
-
Constructor Details
-
DummyRhythm
Create a dummy rhythm for specified time signature.- Parameters:
name-ts-
-
-
Method Details
-
equals
-
getTimeSignature
- Specified by:
getTimeSignaturein interfaceRhythm
-
hashCode
public int hashCode() -
getRhythmVoices
- Specified by:
getRhythmVoicesin interfaceRhythm- Returns:
- The voices for which this rhythm can generate music. Each voice must have a unique name.
-
getRhythmParameters
- Specified by:
getRhythmParametersin interfaceRhythm- Returns:
- The RhythmParameters that influence the way this rhythm generates music.
-
getFeatures
Description copied from interface:RhythmThe general features of this rhythm.- Specified by:
getFeaturesin interfaceRhythm- Returns:
-
loadResources
Description copied from interface:RhythmTell the rhythm it may load any memory-heavy resources.This will fire a PROP_RESOURCES_LOADED change event with newValue=true.
- Specified by:
loadResourcesin interfaceRhythm- Throws:
MusicGenerationException- See Also:
-
isResourcesLoaded
public boolean isResourcesLoaded()- Specified by:
isResourcesLoadedin interfaceRhythm- Returns:
- true
-
releaseResources
public void releaseResources()This implementation does nothing.- Specified by:
releaseResourcesin interfaceRhythm- See Also:
-
compareTo
Description copied from interface:RhythmCompare alphabetically on the rhythm's name.- Specified by:
compareToin interfaceComparable<Rhythm>- Specified by:
compareToin interfaceRhythm
-
getFile
Description copied from interface:RhythmOptional file from which this rhythm was loaded. -
getUniqueId
Description copied from interface:RhythmA unique string identifier representing this rhythm.It will be used by other serialized objects who want to refer this rhythm -typically a Song object.
- Specified by:
getUniqueIdin interfaceRhythm- Returns:
- A non-empty String with spaces trimmed.
-
getDescription
- Specified by:
getDescriptionin interfaceRhythm
-
getPreferredTempo
public int getPreferredTempo()- Specified by:
getPreferredTempoin interfaceRhythm
-
getName
-
getAuthor
-
getTags
Description copied from interface:RhythmCan be any keyword strings used to describe the rhythm. -
toString
-
addPropertyChangeListener
- Specified by:
addPropertyChangeListenerin interfaceRhythm
-
removePropertyChangeListener
- Specified by:
removePropertyChangeListenerin interfaceRhythm
-