Package ca.phon.session
Class TierString
java.lang.Object
ca.phon.extensions.ExtendableObject
ca.phon.session.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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionchar
charAt
(int index) int
codePointAt
(int index) int
codePointBefore
(int index) int
codePointCount
(int beginIndex, int endIndex) int
int
boolean
boolean
boolean
boolean
boolean
boolean
equalsIgnoreCase
(String anotherString) byte[]
getBytes()
void
getBytes
(int srcBegin, int srcEnd, byte[] dst, int dstBegin) Deprecated.byte[]
byte[]
void
getChars
(int srcBegin, int srcEnd, char[] dst, int dstBegin) getWord
(int wordIndex) int
getWordOffset
(int wordIndex) Return the character offset of the start of the given word.getWords()
int
hashCode()
int
indexOf
(int ch) int
indexOf
(int ch, int fromIndex) int
int
intern()
boolean
isEmpty()
int
lastIndexOf
(int ch) int
lastIndexOf
(int ch, int fromIndex) int
lastIndexOf
(String str) int
lastIndexOf
(String str, int fromIndex) int
length()
boolean
int
int
offsetByCodePoints
(int index, int codePointOffset) boolean
regionMatches
(boolean ignoreCase, int toffset, String other, int ooffset, int len) boolean
regionMatches
(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[]
boolean
startsWith
(String prefix) boolean
startsWith
(String prefix, int toffset) subSequence
(int beginIndex, int endIndex) substring
(int beginIndex) substring
(int beginIndex, int endIndex) char[]
toLowerCase
(Locale locale) toString()
toUpperCase
(Locale locale) trim()
Methods inherited from class ca.phon.extensions.ExtendableObject
getExtension, getExtensions, putExtension, removeExtension
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
length
in interfaceCharSequence
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAt
in 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:
compareTo
in interfaceComparable<String>
-
compareToIgnoreCase
-
regionMatches
-
regionMatches
-
startsWith
-
startsWith
-
endsWith
-
hashCode
public int 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:
subSequence
in interfaceCharSequence
-
concat
-
replace
-
matches
-
contains
-
replaceFirst
-
replaceAll
-
replace
-
split
-
split
-
toLowerCase
-
toLowerCase
-
toUpperCase
-
toUpperCase
-
trim
-
toString
- Specified by:
toString
in interfaceCharSequence
- Overrides:
toString
in classObject
-
toCharArray
public char[] toCharArray() -
intern
-