provided.music
Class Triplet

java.lang.Object
  extended by provided.music.NoteCollection
      extended by 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.


Field Summary
 
Fields inherited from class provided.music.NoteCollection
notes
 
Constructor Summary
Triplet(Note n1, Note n2, Note n3)
          Create a new Note out of three notes
 
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 provided.music.NoteCollection
getNotes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Triplet

public Triplet(Note n1,
               Note n2,
               Note n3)
Create a new Note out of three notes

Parameters:
n1 - the first note in the triplet
n2 - the second note in the triplet
n3 - the third note in the triplet
Method Detail

execute

public java.lang.Object execute(IPhraseVisitor algo,
                                java.lang.Object... params)
Calls the "Triplet" case of the visitor

Parameters:
algo - the visitor being used
params - 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)"