ritornello.core.performance
Class Measure

java.lang.Object
  |
  +--ritornello.core.performance.Measure
All Implemented Interfaces:
Collection, Serializable

public class Measure
extends java.lang.Object
implements Collection, Serializable


Constructor Summary
Measure(int number)
           
 
Method Summary
 void addElement(java.lang.Object object)
           
 java.io.OutputStream exportTo()
           
 java.util.Iterator getElements()
           
 KeySignature getKeySignature()
          Returns the key data.
 int getNumber()
          Returns the measure number (e.g. the first measure of a staff has NUMBER = 1).
 Staff getStaff()
          Returns the actual staff.
 TimeSignature getTimeSignature()
          Returns the time data.
 void importFrom(java.io.InputStream in)
           
 void removeAllElements()
           
 boolean removeElement(java.lang.Object object)
           
 void setKeySignature(KeySignature keySignature)
          Sets the key data.
 void setNumber(int number)
          Sets the number information.
 void setStaff(Staff staff)
          Sets the owner staff.
 void setTimeSignature(TimeSignature timeSignature)
          Sets the time data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Measure

public Measure(int number)
Parameters:
number - - The measure number.
Method Detail

getTimeSignature

public TimeSignature getTimeSignature()
Returns the time data.

Returns:
TimeSignature

getKeySignature

public KeySignature getKeySignature()
Returns the key data.

Returns:
KeySignature

getNumber

public int getNumber()
Returns the measure number (e.g. the first measure of a staff has NUMBER = 1).

Returns:
int

getStaff

public Staff getStaff()
Returns the actual staff.

Returns:
Staff

setNumber

public void setNumber(int number)
Sets the number information.

Parameters:
number - - The measure's number.

removeAllElements

public void removeAllElements()
Specified by:
removeAllElements in interface Collection

removeElement

public boolean removeElement(java.lang.Object object)
Specified by:
removeElement in interface Collection
Parameters:
object -
Returns:
boolean

setStaff

public void setStaff(Staff staff)
Sets the owner staff.

Parameters:
staff - - The owner staff.

addElement

public void addElement(java.lang.Object object)
                throws IncompatibleElementException,
                       ValidationException
Specified by:
addElement in interface Collection
Parameters:
object -
Throws:
IncompatibleElementException
ValidationException

getElements

public java.util.Iterator getElements()
Specified by:
getElements in interface Collection
Returns:
java.util.Iterator

importFrom

public void importFrom(java.io.InputStream in)
Specified by:
importFrom in interface Serializable
Parameters:
in -

exportTo

public java.io.OutputStream exportTo()
Specified by:
exportTo in interface Serializable
Returns:
java.io.OutputStream

setTimeSignature

public void setTimeSignature(TimeSignature timeSignature)
Sets the time data.

Parameters:
timeSignature - The time signature data.

setKeySignature

public void setKeySignature(KeySignature keySignature)
Sets the key data.

Parameters:
keySignature - The key signature data.