music
Class Triplet
java.lang.Object
music.NoteCollection
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)
Executes (accepts) the visitor, calling the case associated with this host's index value. |
java.lang.String |
toString()
|
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
- n2
- n3
-
execute
public java.lang.Object execute(IPhraseVisitor algo,
java.lang.Object... params)
- Description copied from interface:
IPhrase
- Executes (accepts) the visitor, calling the case associated with this host's index value.
- Parameters:
algo
- The visitor to executeparams
- The input parameters supplied to the algo when its appropriate case is called.
- Returns:
- The return value from executing the appropriate case on the visitor.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- Returns:
- string representation of the triplet