Package com.yahoo.text
Class Utf8String
java.lang.Object
com.yahoo.text.AbstractUtf8Array
com.yahoo.text.Utf8Array
com.yahoo.text.Utf8String
- All Implemented Interfaces:
CharSequence,Comparable<AbstractUtf8Array>
String with Utf8 backing.
- Author:
- baldersheim
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionUtf8String(AbstractUtf8Array utf8) This will create a string based on the utf8 sequence.Utf8String(String str) This will construct a utf8 backing of the given string. -
Method Summary
Modifier and TypeMethodDescriptioncharcharAt(int index) booleanintlength()subSequence(int start, int end) toString()Retuerns the utf8 sequence as a Java string.Methods inherited from class com.yahoo.text.Utf8Array
getByteLength, getByteOffset, getBytesMethods inherited from class com.yahoo.text.AbstractUtf8Array
ascii7BitLowerCase, compareTo, getByte, hashCode, isEmpty, wrap, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Constructor Details
-
Utf8String
This will construct a utf8 backing of the given string.- Parameters:
str- The string that will be utf8 encoded
-
Utf8String
This will create a string based on the utf8 sequence.- Parameters:
utf8- The backing array
-
-
Method Details
-
charAt
public char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
equals
- Overrides:
equalsin classAbstractUtf8Array
-
toString
Description copied from class:AbstractUtf8ArrayRetuerns the utf8 sequence as a Java string.- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classAbstractUtf8Array
-