Class IndexedAlias

java.lang.Object
net.fellbaum.jemoji.IndexedAlias

public final class IndexedAlias extends Object
Represents an alias with character and codepoint indexes.
  • Method Details

    • getEmojis

      public List<Emoji> getEmojis()
      Gets the Emojis.
      Returns:
      The emojis.
    • getAlias

      public String getAlias()
      Gets the captured alias.
      Returns:
      The captured alias.
    • getCharIndex

      public int getCharIndex()
      Gets the character index at which the alias starts.

      The index is included in 0 < input <= input.length() - 1

      Returns:
      The character index at which the alias starts.
    • getCodePointIndex

      public int getCodePointIndex()
      Gets the codepoint index at which the alias starts.

      This must not be confused with getCharIndex(), a codepoint can contain one or two characters, which means the codepoint index will likely be lower than the character index.

      Returns:
      The character index at which the alias starts.
    • getEndCharIndex

      public int getEndCharIndex()
      Gets the character index at which the alias ends.

      The index is included in 0 < input <= input.length() - 1

      Returns:
      The character index at which the alias ends.
    • getEndCodePointIndex

      public int getEndCodePointIndex()
      Gets the codepoint index at which the alias ends.

      This must not be confused with getEndCharIndex(), a codepoint can contain one or two characters, which means the codepoint index will likely be lower than the character index.

      Returns:
      The character index at which the alias ends.
    • toString

      public String toString()
      Overrides:
      toString in class Object