provided.music
Class Triplet
java.lang.Object
provided.music.NoteCollection
provided.music.Triplet
- All Implemented Interfaces:
- INote, IPhrase
public class Triplet
- extends NoteCollection
A musical triplet. The three notes should be played with 2/3 of their
indicated duration.
Method Summary |
java.lang.Object |
execute(IPhraseVisitor algo,
java.lang.Object... params)
Calls the "Triplet" case of the visitor |
java.lang.String |
toString()
Return string representation of the triplet |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Triplet
public Triplet(Note n1,
Note n2,
Note n3)
- Create a new Note out of three notes
- Parameters:
n1
- the first note in the tripletn2
- the second note in the tripletn3
- the third note in the triplet
execute
public java.lang.Object execute(IPhraseVisitor algo,
java.lang.Object... params)
- Calls the "Triplet" case of the visitor
- Parameters:
algo
- the visitor being usedparams
- vararg list of parameters for use by the visitor
- Returns:
- the result of the "Triplet" case of the visitor.
toString
public java.lang.String toString()
- Return string representation of the triplet
- Overrides:
toString
in class java.lang.Object
- Returns:
- "Triplet(n1, n2, n3)"