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
ConstructorDescriptionDummyRhythm
(String name, TimeSignature ts) Create a dummy rhythm for specified time signature. -
Method Summary
Modifier and TypeMethodDescriptionvoid
int
Compare alphabetically on the rhythm's name.boolean
The general features of this rhythm.getFile()
Optional file from which this rhythm was loaded.getName()
int
List<RhythmParameter<?>>
String[]
getTags()
Can be any keyword strings used to describe the rhythm.A unique string identifier representing this rhythm.int
hashCode()
boolean
void
Tell the rhythm it may load any memory-heavy resources.void
This implementation does nothing.void
toString()
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:
getTimeSignature
in interfaceRhythm
-
hashCode
public int hashCode() -
getRhythmVoices
- Specified by:
getRhythmVoices
in interfaceRhythm
- Returns:
- The voices for which this rhythm can generate music. Each voice must have a unique name.
-
getRhythmParameters
- Specified by:
getRhythmParameters
in interfaceRhythm
- Returns:
- The RhythmParameters that influence the way this rhythm generates music.
-
getFeatures
Description copied from interface:Rhythm
The general features of this rhythm.- Specified by:
getFeatures
in interfaceRhythm
- Returns:
-
loadResources
Description copied from interface:Rhythm
Tell the rhythm it may load any memory-heavy resources.This will fire a PROP_RESOURCES_LOADED change event with newValue=true.
- Specified by:
loadResources
in interfaceRhythm
- Throws:
MusicGenerationException
- See Also:
-
isResourcesLoaded
public boolean isResourcesLoaded()- Specified by:
isResourcesLoaded
in interfaceRhythm
- Returns:
- true
-
releaseResources
public void releaseResources()This implementation does nothing.- Specified by:
releaseResources
in interfaceRhythm
- See Also:
-
compareTo
Description copied from interface:Rhythm
Compare alphabetically on the rhythm's name.- Specified by:
compareTo
in interfaceComparable<Rhythm>
- Specified by:
compareTo
in interfaceRhythm
-
getFile
Description copied from interface:Rhythm
Optional file from which this rhythm was loaded. -
getUniqueId
Description copied from interface:Rhythm
A 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:
getUniqueId
in interfaceRhythm
- Returns:
- A non-empty String with spaces trimmed.
-
getDescription
- Specified by:
getDescription
in interfaceRhythm
-
getPreferredTempo
public int getPreferredTempo()- Specified by:
getPreferredTempo
in interfaceRhythm
-
getName
-
getAuthor
-
getTags
Description copied from interface:Rhythm
Can be any keyword strings used to describe the rhythm. -
toString
-
addPropertyChangeListener
- Specified by:
addPropertyChangeListener
in interfaceRhythm
-
removePropertyChangeListener
- Specified by:
removePropertyChangeListener
in interfaceRhythm
-