Rule.Phoneme (Apache Commons Codec 1.22.1 API)
Description: declaration: package: org.apache.commons.codec.language.bm, class: Rule, class: Phoneme

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`