net.charlesames.music.ensemble
Class TuningElement

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
All Implemented Interfaces:
EntityContainer
Direct Known Subclasses:
TuningElementAccidental, TuningElementDegree, TuningElementInflection, TuningElementLetter

public abstract class TuningElement
extends EnsembleEntity

Element of a mapping from degrees to cents.

Author:
Charles Ames

Nested Class Summary
 
Nested classes/interfaces inherited from class net.charlesames.music.ensemble.EnsembleEntity
EnsembleEntity.AttributeTable
 
Constructor Summary
TuningElement(TuningMap container, java.lang.String name)
          Constructor for TuningElement instances.
 
Method Summary
abstract  void checkCents(int cents)
          Check the indicated cents value.
 boolean equals(EnsembleEntity other)
          Check if this entity has the same class and content as another entity.
 int getCents()
          Get the cents value.
 void setCents(int cents)
          Set the cents value.
 
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

TuningElement

public TuningElement(TuningMap container,
                     java.lang.String name)
Constructor for TuningElement instances.

Parameters:
container - The TuningMap that contains this element.
name -
Method Detail

checkCents

public abstract void checkCents(int cents)
Check the indicated cents value.

Parameters:
cents - The indicated cents value.

getCents

public int getCents()
Get the cents value.

Returns:
The assigned cents value.

setCents

public void setCents(int cents)
Set the cents value.

Parameters:
cents - The intended cents value.

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 EnsembleEntity
Parameters:
other - The other entity.
Returns:
True if the two entities have the same class and content; false otherwise.