net.charlesames.music.ensemble
Class TuningElementLetter

java.lang.Object
  extended by net.charlesames.utility.common.Disposable
      extended by net.charlesames.utility.entity.Entity
          extended by net.charlesames.utility.entity.WriteableEntity
              extended by net.charlesames.music.ensemble.EnsembleEntity
                  extended by net.charlesames.music.ensemble.TuningElement
                      extended by net.charlesames.music.ensemble.TuningElementLetter
All Implemented Interfaces:
EntityContainer

public class TuningElementLetter
extends TuningElement

Author:
Charles Ames

Nested Class Summary
 
Nested classes/interfaces inherited from class net.charlesames.music.ensemble.EnsembleEntity
EnsembleEntity.AttributeTable
 
Constructor Summary
TuningElementLetter(TuningMapDiatonic container, LetterName letterName)
          Constructor for TuningElementLetter instances.
 
Method Summary
 void checkCents(int cents)
          Check the indicated cents value.
static XmlSpec createXmlSpec()
          Create an XML specification for the TuningElementLetter class.
 boolean equals(EnsembleEntity other)
          Check if this entity has the same class and content as another entity.
static TuningElementLetter fromXmlNode(org.w3c.dom.Element element, TuningMapDiatonic container)
          Create a new TuningElementLetter instance and fill it with loaded data.
 LetterName getLetterName()
          Get the LetterName for this tuning element.
 
Methods inherited from class net.charlesames.music.ensemble.TuningElement
getCents, setCents
 
Methods inherited from class net.charlesames.music.ensemble.EnsembleEntity
buildDescription, copyToClipboard, createIndentCell, createXmlSpec, describeFeature, getContainer, getEnsemble, logError, predecessor, toString
 
Methods inherited from class net.charlesames.utility.entity.WriteableEntity
check, clearXmlSpecs, createXmlSpec, getTagName, getXmlData, getXmlSpec, getXmlSpec, initializeXsd, isPersistent, logError, logError, makeDirty, putXmlData, save, setID, setName, setPersistent, setStatus, toXmlNode
 
Methods inherited from class net.charlesames.utility.entity.Entity
decrementReferenceCount, dereferenceHandle, dispose, equals, getHandle, getID, getName, getPath, getReferenceCount, getStatus, getText, hasContainer, incrementReferenceCount, isModifiable, methodHasOverride, predecessor, resequenceEntities, setContainer, setModifiable, shiftEntitiesDown, shiftEntityDown, shiftEntityUp, successor, wipe
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TuningElementLetter

public TuningElementLetter(TuningMapDiatonic container,
                           LetterName letterName)
Constructor for TuningElementLetter instances.

Parameters:
container - The TuningMapDiatonic which contains this element.
letterName - The LetterName to which this element maps a cents displacement.
Method Detail

getLetterName

public LetterName getLetterName()
Get the LetterName for this tuning element.

Returns:
The LetterName for this tuning element.

fromXmlNode

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

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

checkCents

public void checkCents(int cents)
Description copied from class: TuningElement
Check the indicated cents value.

Specified by:
checkCents in class TuningElement
Parameters:
cents - The indicated cents value.

createXmlSpec

public static XmlSpec createXmlSpec()
Create an XML specification for the TuningElementLetter class.

Returns:
The newly created XmlSpec instance.
Throws:
java.lang.RuntimeException - when an XmlSpec instance already exists for the TuningElementLetter class.

equals

public boolean equals(EnsembleEntity other)
Description copied from class: EnsembleEntity
Check if this entity has the same class and content as another entity.

Overrides:
equals in class TuningElement
Parameters:
other - The other entity.
Returns:
True if the two entities have the same class and content; false otherwise.