provided.music
Class Chord

java.lang.Object
  extended by provided.music.NoteCollection
      extended by provided.music.Chord
All Implemented Interfaces:
INote, IPhrase

public class Chord
extends NoteCollection

A collection of notes that make up a Chord. All of the notes should be played simultaneously. The last note defines the length of all the notes.


Field Summary
 
Fields inherited from class provided.music.NoteCollection
notes
 
Constructor Summary
Chord(Note... notes)
          Create a Chord out of a collection of notes.
 
Method Summary
 java.lang.Object execute(IPhraseVisitor algo, java.lang.Object... params)
          Calls the "Chord" case of the given algo.
 java.lang.String toString()
          Returns a string representation of the chord: "(noteA, noteB, ...)"
 
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

Chord

public Chord(Note... notes)
Create a Chord out of a collection of notes.

Parameters:
notes - vararg list of notes used in the chord.
Method Detail

execute

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

Parameters:
algo - The IPhraseVisitor algo to use.
params - vararg list of input parameters
Returns:
the result of running the Chord case of the visitor.

toString

public java.lang.String toString()
Returns a string representation of the chord: "(noteA, noteB, ...)"

Overrides:
toString in class java.lang.Object
Returns:
string representation of the chord