net.charlesames.music.musicxml.notation
Class Tuplet

java.lang.Object
  extended by net.charlesames.utility.common.Disposable
      extended by net.charlesames.music.musicxml.MusicXmlEntity
          extended by net.charlesames.music.musicxml.notation.Notation
              extended by net.charlesames.music.musicxml.notation.Tuplet

public class Tuplet
extends Notation

The Tuplet class implements the MusicXML <tuplet> notation.

Author:
Charles Ames

Method Summary
 boolean equals(MusicXmlEntity other)
          Test if this MusicXML entity has the same content as another object.
static Tuplet fromXmlNode(org.w3c.dom.Element element, NoteInMeasure container)
          Create a new Tuplet instance and fill it with loaded data.
 int getActual()
          Getter for the Actual property.
 YesNo getBracket()
          Getter for the Bracket property.
static Tuplet getInstance(NoteInMeasure container)
          Create a new Tuplet instance.
 int getNormal()
          Getter for the Normal property.
 int getNumber()
          Getter for the Number property.
 TupletShowNumber getShowNumber()
          Getter for the ShowNumber property.
 StartStop getTupletType()
          Getter for the TupletType property.
 void putXmlData(org.w3c.dom.Element element)
           
 void setActual(int actual)
          Setter for the Actual property.
 void setBracket(YesNo bracket)
          Setter for the Bracket property.
 void setNormal(int normal)
          Setter for the Normal property.
 void setNumber(int number)
          Setter for the Number property.
 void setShowNumber(TupletShowNumber showNumber)
          Setter for the ShowNumber property.
 void setTupletType(StartStop tupletType)
          Setter for the TupletType property.
 org.w3c.dom.Node toXmlNode(org.w3c.dom.Node parent)
          Serialize the content of a MusicXML entity into an XML element.
 
Methods inherited from class net.charlesames.music.musicxml.notation.Notation
dispose, getContent, getPlacement, setContent, setPlacement
 
Methods inherited from class net.charlesames.music.musicxml.MusicXmlEntity
getContainer, makeDirty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Tuplet getInstance(NoteInMeasure container)
Create a new Tuplet instance.

Parameters:
container - The NoteInMeasure which will contain the new Tuplet instance.
Returns:
The newly created Tuplet instance.

getNumber

public int getNumber()
Getter for the Number property.

Returns:
The current Number value.

setNumber

public void setNumber(int number)
Setter for the Number property.

Parameters:
number - The intended Number value.

getActual

public int getActual()
Getter for the Actual property.

Returns:
The current Actual value.

setActual

public void setActual(int actual)
Setter for the Actual property.

Parameters:
actual - The intended Actual value.

getNormal

public int getNormal()
Getter for the Normal property.

Returns:
The current Normal value.

setNormal

public void setNormal(int normal)
Setter for the Normal property.

Parameters:
normal - The intended Normal value.

getTupletType

public StartStop getTupletType()
Getter for the TupletType property.

Returns:
The current TupletType value.

setTupletType

public void setTupletType(StartStop tupletType)
Setter for the TupletType property.

Parameters:
tupletType - The intended TupletType value.

getBracket

public YesNo getBracket()
Getter for the Bracket property.

Returns:
The current Bracket value.

setBracket

public void setBracket(YesNo bracket)
Setter for the Bracket property.

Parameters:
bracket - The intended Bracket value.

getShowNumber

public TupletShowNumber getShowNumber()
Getter for the ShowNumber property.

Returns:
The current ShowNumber value.

setShowNumber

public void setShowNumber(TupletShowNumber showNumber)
Setter for the ShowNumber property.

Parameters:
showNumber - The intended ShowNumber value.

toXmlNode

public org.w3c.dom.Node toXmlNode(org.w3c.dom.Node parent)
Description copied from class: MusicXmlEntity
Serialize the content of a MusicXML entity into an XML element.

Specified by:
toXmlNode in class MusicXmlEntity
Parameters:
parent - The XML element which is to receive the data.
Returns:
The newly created XML element.

putXmlData

public void putXmlData(org.w3c.dom.Element element)
Overrides:
putXmlData in class Notation

fromXmlNode

public static Tuplet fromXmlNode(org.w3c.dom.Element element,
                                 NoteInMeasure container)
Create a new Tuplet instance and fill it with loaded data.

Parameters:
element - The XML element that provides the Tuplet data
container - The NoteInMeasure which will contain the new Tuplet instance.
Returns:
The newly created Tuplet instance.

equals

public boolean equals(MusicXmlEntity other)
Description copied from class: MusicXmlEntity
Test if this MusicXML entity has the same content as another object.

Overrides:
equals in class Notation
Parameters:
other - The other object.
Returns:
True if both objects have the same content; false otherwise.