Class Phone

All Implemented Interfaces:
IExtendable, CombiningDiacritics, PrefixDiacritics, SuffixDiacritics, Visitable<IPAElement>
Direct Known Subclasses:
CompoundPhone

public class Phone extends IPAElement implements PrefixDiacritics, SuffixDiacritics, CombiningDiacritics

A basic phone consists of the following parts:

  • A (optional) prefix diacritic
  • A base glyph (i.e., Consonant, Vowel, etc.)
  • Combining diacritics
  • Length - measured from 0-3, with 0 being no length modifier
  • A (optional) suffix diacritic
  • Constructor Details

    • Phone

      public Phone(Character basePhone)
      Create a new Phone for the given base phone.
      Parameters:
      basePhone -
    • Phone

      public Phone(Character basePhone, FeatureSet overrideFeatureSet, SyllableInfo syllableInfo)
      Create a new Phone for the given base
      Parameters:
      basePhone -
      overrideFeatureSet -
      syllableInfo -
  • Method Details

    • getPrefixDiacritics

      public Diacritic[] getPrefixDiacritics()
      Specified by:
      getPrefixDiacritics in interface PrefixDiacritics
    • getPrefix

      public String getPrefix()
      Get the string representing this phone's prefix.
      Returns:
    • getPrefixFeatures

      public FeatureSet getPrefixFeatures()
      Get the feature set for the prefix diacritic.
      Returns:
      feature set for the prefix diacritic or an empty set if not found
    • getBasePhone

      public Character getBasePhone()
      Get the primary glyph for this Phone. All other parts of the Phone are 'attached' to this glyph.
      Returns:
      the base character for the Phone
    • getBase

      public String getBase()
      Get the string for the phone's base.
      Returns:
      the text for the phone's base
    • getBaseFeatures

      public FeatureSet getBaseFeatures()
      Get the feature set for the base phone
      Returns:
      the base phone's feature set or an empty set if not found
    • getCombiningDiacritics

      public Diacritic[] getCombiningDiacritics()

      Get the combining diacritics for the phone.

      Specified by:
      getCombiningDiacritics in interface CombiningDiacritics
      Returns:
      the combining diacritics, or an empty array if no combining diacritics are available.
    • getLengthDiacritics

      public Diacritic[] getLengthDiacritics()
    • getCombining

      public String getCombining()
      Get the string for the combining diacritic portion of the phone.
      Returns:
      the combining diacritic string
    • getCombiningFeatures

      public FeatureSet getCombiningFeatures()
      Get the feature set for all combining diacritics.
      Returns:
      the feature set for all combining diacritics
    • getSuffixDiacritics

      public Diacritic[] getSuffixDiacritics()
      Specified by:
      getSuffixDiacritics in interface SuffixDiacritics
    • getSuffix

      public String getSuffix()
      Get the string for this phone's suffix.
      Returns:
      the text for the suffix portion of the Phone
    • getSuffixFeatures

      public FeatureSet getSuffixFeatures()
      Get the feature set for the suffix diacritic
      Returns:
      feature set for the suffix diacritic or an empty set if not found
    • _getFeatureSet

      protected FeatureSet _getFeatureSet()
      Description copied from class: IPAElement
      Private method to return the feature set for the IPAElement.
      Specified by:
      _getFeatureSet in class IPAElement
      Returns:
      the feature set for the implementing type.
    • getText

      public String getText()
      Description copied from class: IPAElement
      Get the text for this phone
      Specified by:
      getText in class IPAElement
      Returns:
      the phone string