Class TierString

All Implemented Interfaces:
IExtendable, Serializable, CharSequence, Comparable<String>

public class TierString extends ExtendableObject implements Serializable, Comparable<String>, CharSequence
Custom String implementation for tiers with extension support.
See Also:
  • Constructor Details

    • TierString

      public TierString()
    • TierString

      public TierString(String value)
  • Method Details

    • getWords

      public List<TierString> getWords()
    • numberOfWords

      public int numberOfWords()
    • getWordOffset

      public int getWordOffset(int wordIndex)
      Return the character offset of the start of the given word.
      Parameters:
      wordIndex -
      Returns:
    • getWord

      public TierString getWord(int wordIndex)
    • length

      public int length()
      Specified by:
      length in interface CharSequence
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface CharSequence
    • charAt

      public char charAt(int index)
      Specified by:
      charAt in interface CharSequence
    • codePointAt

      public int codePointAt(int index)
    • codePointBefore

      public int codePointBefore(int index)
    • codePointCount

      public int codePointCount(int beginIndex, int endIndex)
    • offsetByCodePoints

      public int offsetByCodePoints(int index, int codePointOffset)
    • getChars

      public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
    • getBytes

      @Deprecated public void getBytes(int srcBegin, int srcEnd, byte[] dst, int dstBegin)
      Deprecated.
    • getBytes

      public byte[] getBytes(String charsetName) throws UnsupportedEncodingException
      Throws:
      UnsupportedEncodingException
    • getBytes

      public byte[] getBytes(Charset charset)
    • getBytes

      public byte[] getBytes()
    • equals

      public boolean equals(Object anObject)
      Overrides:
      equals in class Object
    • contentEquals

      public boolean contentEquals(StringBuffer sb)
    • contentEquals

      public boolean contentEquals(CharSequence cs)
    • equalsIgnoreCase

      public boolean equalsIgnoreCase(String anotherString)
    • compareTo

      public int compareTo(String anotherString)
      Specified by:
      compareTo in interface Comparable<String>
    • compareToIgnoreCase

      public int compareToIgnoreCase(String str)
    • regionMatches

      public boolean regionMatches(int toffset, String other, int ooffset, int len)
    • regionMatches

      public boolean regionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len)
    • startsWith

      public boolean startsWith(String prefix, int toffset)
    • startsWith

      public boolean startsWith(String prefix)
    • endsWith

      public boolean endsWith(String suffix)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • indexOf

      public int indexOf(int ch)
    • indexOf

      public int indexOf(int ch, int fromIndex)
    • lastIndexOf

      public int lastIndexOf(int ch)
    • lastIndexOf

      public int lastIndexOf(int ch, int fromIndex)
    • indexOf

      public int indexOf(String str)
    • indexOf

      public int indexOf(String str, int fromIndex)
    • lastIndexOf

      public int lastIndexOf(String str)
    • lastIndexOf

      public int lastIndexOf(String str, int fromIndex)
    • substring

      public String substring(int beginIndex)
    • substring

      public String substring(int beginIndex, int endIndex)
    • subSequence

      public CharSequence subSequence(int beginIndex, int endIndex)
      Specified by:
      subSequence in interface CharSequence
    • concat

      public String concat(String str)
    • replace

      public String replace(char oldChar, char newChar)
    • matches

      public boolean matches(String regex)
    • contains

      public boolean contains(CharSequence s)
    • replaceFirst

      public String replaceFirst(String regex, String replacement)
    • replaceAll

      public String replaceAll(String regex, String replacement)
    • replace

      public String replace(CharSequence target, CharSequence replacement)
    • split

      public String[] split(String regex, int limit)
    • split

      public String[] split(String regex)
    • toLowerCase

      public String toLowerCase(Locale locale)
    • toLowerCase

      public String toLowerCase()
    • toUpperCase

      public String toUpperCase(Locale locale)
    • toUpperCase

      public String toUpperCase()
    • trim

      public String trim()
    • toString

      public String toString()
      Specified by:
      toString in interface CharSequence
      Overrides:
      toString in class Object
    • toCharArray

      public char[] toCharArray()
    • intern

      public String intern()