Package org.apache.commons.codec.language.bm

# Class Rule.Phoneme

java.lang.Object
org.apache.commons.codec.language.bm.Rule.Phoneme

All Implemented Interfaces:
  `Rule.PhonemeExpr`

Enclosing class:
  `Rule`

public static final class Rule.Phoneme extends Object implements Rule.PhonemeExpr
A phoneme.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final Comparator<Rule.Phoneme>`
  `COMPARATOR`
  The Phoneme Comparator.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Phoneme(CharSequence phonemeText, Languages.LanguageSet languages)`
  Constructs a new instance.
  `Phoneme(Rule.Phoneme phonemeLeft, Rule.Phoneme phonemeRight)`
  Constructs a new instance.
  `Phoneme(Rule.Phoneme phonemeLeft, Rule.Phoneme phonemeRight, Languages.LanguageSet languages)`
  Constructs a new instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Rule.Phoneme`
  `append(CharSequence sequence)`
  Appends the sequence to the phone text.
  `Languages.LanguageSet`
  `getLanguages()`
  Gets the language set.
  `Iterable<Rule.Phoneme>`
  `getPhonemes()`
  Gets an iteration of phonemes.
  `CharSequence`
  `getPhonemeText()`
  Gets the phoneme text sequence.
  `Rule.Phoneme`
  `join(Rule.Phoneme right)`
  Deprecated.
  since 1.9
  `Rule.Phoneme`
  `mergeWithLanguage(Languages.LanguageSet lang)`
  Returns a new Phoneme with the same text but a union of its current language set and the given one.
  `int`
  `size()`
  Gets the expression size in phonemes.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### COMPARATOR

    public static final Comparator<Rule.Phoneme> COMPARATOR
    The Phoneme Comparator.

- ## Constructor Details

  - ### Phoneme

    public Phoneme(CharSequence phonemeText, Languages.LanguageSet languages)
    Constructs a new instance.
    Parameters:
      `phonemeText` - The phoneme text.
      `languages` - A language set.

  - ### Phoneme

    public Phoneme(Rule.Phoneme phonemeLeft, Rule.Phoneme phonemeRight)
    Constructs a new instance.
    Parameters:
      `phonemeLeft` - The left phoneme text.
      `phonemeRight` - The right phoneme text.

  - ### Phoneme

    public Phoneme(Rule.Phoneme phonemeLeft, Rule.Phoneme phonemeRight, Languages.LanguageSet languages)
    Constructs a new instance.
    Parameters:
      `phonemeLeft` - The left phoneme text.
      `phonemeRight` - The right phoneme text.
      `languages` - A language set.

- ## Method Details

  - ### append

    public Rule.Phoneme append(CharSequence sequence)
    Appends the sequence to the phone text.
    Parameters:
      `sequence` - The sequence to append.
    Returns:
      this instance.

  - ### getLanguages

    public Languages.LanguageSet getLanguages()
    Gets the language set.
    Returns:
      the language set.

  - ### getPhonemes

    public Iterable<Rule.Phoneme> getPhonemes()
    Description copied from interface: `Rule.PhonemeExpr`
    Gets an iteration of phonemes.
    Specified by:
      `getPhonemes` in interface `Rule.PhonemeExpr`
    Returns:
      an iteration of phonemes.

  - ### getPhonemeText

    public CharSequence getPhonemeText()
    Gets the phoneme text sequence.
    Returns:
      the phoneme text sequence.

  - ### join

    @Deprecated public Rule.Phoneme join(Rule.Phoneme right)
    Deprecated.
    since 1.9
    Deprecated since 1.9.
    Parameters:
      `right` - the Phoneme to join
    Returns:
      a new Phoneme

  - ### mergeWithLanguage

    public Rule.Phoneme mergeWithLanguage(Languages.LanguageSet lang)
    Returns a new Phoneme with the same text but a union of its current language set and the given one.
    Parameters:
      `lang` - the language set to merge
    Returns:
      a new Phoneme

  - ### size

    public int size()
    Description copied from interface: `Rule.PhonemeExpr`
    Gets the expression size in phonemes.
    Specified by:
      `size` in interface `Rule.PhonemeExpr`
    Returns:
      the expression size in phonemes.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`