Package io.deephaven.base.string.cache
Interface StringAlike<TYPE>
- All Superinterfaces:
CharSequence,Comparable<CharSequence>,Serializable,StringCompatible
- All Known Implementing Classes:
AbstractCompressedString,CompressedString,MappedCompressedString
This creates an interface (with more permissive argument types, and generified return types) for most public instance
methods of class String.
For static methods, often the String implementation should be used and its results converted to the desired type via
construction. That is, for String method M, and StringAlike class SAC, follow the following pattern: new
SAC(String.M(args...))
For JavaDocs, see
String.-
Method Summary
Modifier and TypeMethodDescriptionintcodePointAt(int index) intcodePointBefore(int index) intcodePointCount(int beginIndex, int endIndex) intcompareToIgnoreCase(@NotNull CharSequence that) booleancontains(CharSequence cs) booleancontentEquals(@NotNull CharSequence cs) booleanendsWith(@NotNull CharSequence suffix) booleanequalsIgnoreCase(@NotNull CharSequence that) byte[]getBytes()voidgetChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) intindexOf(int ch) intindexOf(int ch, int fromIndex) intindexOf(CharSequence cs) intindexOf(CharSequence cs, int fromIndex) intern()booleanisEmpty()intlastIndexOf(int ch) intlastIndexOf(int ch, int fromIndex) intintlastIndexOf(CharSequence cs, int fromIndex) booleanmatches(CharSequence regex) booleanregionMatches(boolean ignoreCase, int offset, CharSequence that, int thatOffset, int length) replace(char oldChar, char newChar) replace(CharSequence target, CharSequence replacement) replaceAll(CharSequence regex, CharSequence replacement) replaceFirst(CharSequence regex, CharSequence replacement) TYPE[]split(CharSequence regex) TYPE[]split(CharSequence regex, int limit) booleanstartsWith(@NotNull CharSequence prefix) booleanstartsWith(@NotNull CharSequence prefix, int offset) substring(int beginIndex) substring(int beginIndex, int endIndex) char[]toLowerCase(Locale locale) toUpperCase(Locale locale) trim()Methods inherited from interface java.lang.CharSequence
charAt, chars, codePoints, length, subSequenceMethods inherited from interface io.deephaven.base.string.cache.StringCompatible
compareTo, equals, hashCode, toCompressedString, toMappedCompressedString, toString
-
Method Details
-
isEmpty
boolean isEmpty()- Specified by:
isEmptyin interfaceCharSequence
-
codePointAt
int codePointAt(int index) -
codePointBefore
int codePointBefore(int index) -
codePointCount
int codePointCount(int beginIndex, int endIndex) -
getChars
void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) -
getBytes
byte[] getBytes() -
contentEquals
-
equalsIgnoreCase
-
compareToIgnoreCase
-
regionMatches
boolean regionMatches(boolean ignoreCase, int offset, CharSequence that, int thatOffset, int length) -
startsWith
-
startsWith
-
endsWith
-
indexOf
int indexOf(int ch, int fromIndex) -
indexOf
int indexOf(int ch) -
lastIndexOf
int lastIndexOf(int ch, int fromIndex) -
lastIndexOf
int lastIndexOf(int ch) -
substring
-
substring
-
concat
-
concat
-
matches
-
trim
TYPE trim() -
toCharArray
char[] toCharArray() -
indexOf
-
indexOf
-
lastIndexOf
-
lastIndexOf
-
replace
-
contains
-
replaceFirst
-
replaceAll
-
replace
-
split
-
split
-
toLowerCase
-
toLowerCase
TYPE toLowerCase() -
toUpperCase
-
toUpperCase
TYPE toUpperCase() -
intern
TYPE intern()
-