abc4j API Specification

abc.notation
Class Tune.Music

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by abc.notation.Tune.Music
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess
Enclosing class:
Tune

public class Tune.Music
extends java.util.Vector

See Also:
Serialized Form

Constructor Summary
Tune.Music()
           
 
Method Summary
 void addElement(KeySignature key)
           
 void addElement(NoteAbstract note)
           
 MusicElement getElementAt(int offset)
          Returns the score element location at the specified offset.
 Note getHighestNoteBewteen(MusicElement elmtBegin, MusicElement elmtEnd)
          Returns the highest note between two music elements.
 NoteAbstract getLastNote()
           
 Note getLowestNoteBewteen(MusicElement noteBegin, MusicElement noteEnd)
          MultiNote instances are ignored.
 int indexOf(MusicElement elmnt)
           
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

Tune.Music

public Tune.Music()
Method Detail

addElement

public void addElement(KeySignature key)

addElement

public void addElement(NoteAbstract note)

getLastNote

public NoteAbstract getLastNote()

getElementAt

public MusicElement getElementAt(int offset)
Returns the score element location at the specified offset.

Parameters:
offset - An offset in a char stream.
Returns:
The score element location at the specified offset.

indexOf

public int indexOf(MusicElement elmnt)

getHighestNoteBewteen

public Note getHighestNoteBewteen(MusicElement elmtBegin,
                                  MusicElement elmtEnd)
                           throws java.lang.IllegalArgumentException
Returns the highest note between two music elements. MultiNote instances are ignored.

Parameters:
elmtBegin - The music element where to start (included) the search of the highest note.
elmtEnd - The music element where to end (included) the search of the highest note.
Returns:
The highest note between two music elements. null if no note has been found between the two music elements.
Throws:
java.lang.IllegalArgumentException - Thrown if one of the music elements hasn't been found in the music or if the elmtEnd param is located before the elmntBegin param in the music.

getLowestNoteBewteen

public Note getLowestNoteBewteen(MusicElement noteBegin,
                                 MusicElement noteEnd)
                          throws java.lang.IllegalArgumentException
MultiNote instances are ignored.

Parameters:
noteBegin - (included)
noteEnd - (included)
Returns:
The lowest note between the two given score elements if found.
Throws:
java.lang.IllegalArgumentException

abc4j API Specification

Submit a bug or feature