Class TierString
java.lang.Object
ca.phon.extensions.ExtendableObject
ca.phon.session.tierdata.TierString
- All Implemented Interfaces:
IExtendable,TierElement,Serializable,CharSequence,Comparable<String>
public class TierString
extends ExtendableObject
implements Serializable, Comparable<String>, CharSequence, TierElement
Custom String implementation for tiers with extension support.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncharcharAt(int index) intcodePointAt(int index) intcodePointBefore(int index) intcodePointCount(int beginIndex, int endIndex) intintbooleanbooleanbooleanbooleanbooleanbooleanequalsIgnoreCase(String anotherString) byte[]getBytes()voidgetBytes(int srcBegin, int srcEnd, byte[] dst, int dstBegin) Deprecated.byte[]byte[]voidgetChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) getWord(int wordIndex) intgetWordOffset(int wordIndex) Return the character offset of the start of the given word.getWords()inthashCode()intindexOf(int ch) intindexOf(int ch, int fromIndex) intintintern()booleanisEmpty()intlastIndexOf(int ch) intlastIndexOf(int ch, int fromIndex) intlastIndexOf(String str) intlastIndexOf(String str, int fromIndex) intlength()booleanintintoffsetByCodePoints(int index, int codePointOffset) booleanregionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len) booleanregionMatches(int toffset, String other, int ooffset, int len) replace(char oldChar, char newChar) replace(CharSequence target, CharSequence replacement) replaceAll(String regex, String replacement) replaceFirst(String regex, String replacement) String[]String[]booleanstartsWith(String prefix) booleanstartsWith(String prefix, int toffset) subSequence(int beginIndex, int endIndex) substring(int beginIndex) substring(int beginIndex, int endIndex) text()char[]toLowerCase(Locale locale) toString()toUpperCase(Locale locale) trim()Methods inherited from class ca.phon.extensions.ExtendableObject
getExtension, getExtensions, putExtension, removeExtensionMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
chars, codePoints
-
Constructor Details
-
TierString
public TierString() -
TierString
-
-
Method Details
-
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
-
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
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. -
getBytes
- Throws:
UnsupportedEncodingException
-
getBytes
-
getBytes
public byte[] getBytes() -
equals
-
contentEquals
-
contentEquals
-
equalsIgnoreCase
-
compareTo
- Specified by:
compareToin interfaceComparable<String>
-
compareToIgnoreCase
-
regionMatches
-
regionMatches
-
startsWith
-
startsWith
-
endsWith
-
hashCode
-
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
-
indexOf
-
lastIndexOf
-
lastIndexOf
-
substring
-
substring
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
concat
-
replace
-
matches
-
contains
-
replaceFirst
-
replaceAll
-
replace
-
split
-
split
-
toLowerCase
-
toLowerCase
-
toUpperCase
-
toUpperCase
-
trim
-
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
toCharArray
public char[] toCharArray() -
intern
-
text
- Specified by:
textin interfaceTierElement
-