music
Class Triplet

java.lang.Object
  extended by music.NoteCollection
      extended by 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 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)
          Executes (accepts) the visitor, calling the case associated with this host's index value.
 java.lang.String toString()
           
 
Methods inherited from class 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 -
n2 -
n3 -
Method Detail

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 execute
params - 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