public class IString extends AbstractSequence<Char> implements java.lang.CharSequence, java.io.Externalizable, java.lang.Comparable<IString>, AVector<Char>, java.util.RandomAccess, Consumable
| Modifier and Type | Class and Description |
|---|---|
static class |
IString.SubString |
noIntsATTRIBUTE_VALUE, BOOLEAN_VALUE, CDATA_VALUE, CHAR_VALUE, COMMENT_VALUE, DOCUMENT_VALUE, DOUBLE_VALUE, ELEMENT_VALUE, EOF_VALUE, eofValue, FLOAT_VALUE, INT_S16_VALUE, INT_S32_VALUE, INT_S64_VALUE, INT_S8_VALUE, INT_U16_VALUE, INT_U32_VALUE, INT_U64_VALUE, INT_U8_VALUE, OBJECT_VALUE, PRIM_VALUE, PROCESSING_INSTRUCTION_VALUE, TEXT_BYTE_VALUE| Constructor and Description |
|---|
IString(java.lang.String str) |
| Modifier and Type | Method and Description |
|---|---|
char |
charAt(int i)
To implement CharSequence
|
int |
compareTo(IString other) |
void |
consume(Consumer out) |
int |
effectiveIndex(int index) |
boolean |
equals(java.lang.Object other) |
byte[] |
getBytes(java.lang.String charsetName) |
Char |
getRaw(int index)
Given an "effective index", return element as object.
|
int |
hashCode() |
int |
indexByCodePoints(int index)
used for string-ref
|
int |
length() |
int |
lengthByCodePoints() |
int |
offsetByCodePoints(int i)
Map character offset to char offset.
|
void |
readExternal(java.io.ObjectInput in) |
int |
size()
See java.util.List.
|
IString |
subSequence(int from,
int to)
Substring using offsets in code-units (16-bit chars).
|
char[] |
toCharArray() |
java.lang.String |
toString() |
static IString |
valueOf(java.lang.CharSequence str) |
static IString |
valueOf(java.lang.CharSequence str,
int start,
int count) |
void |
writeExternal(java.io.ObjectOutput out) |
add, add, addAll, addAll, addPos, asImmutable, badRank, boundedHash, checkCanWrite, checkRank, clear, compare, compare, compare, consume, consumeNext, consumePosRange, contains, containsAll, copyPos, createPos, createRelativePos, effectiveIndex, effectiveIndex, effectiveIndex, effectiveIndex, elements, endPos, equals, fill, fill, fillPosRange, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, get, get, get, get, get, getAttribute, getAttributeLength, getBooleanRaw, getByteRaw, getCharRaw, getContainingSequenceSize, getDoubleRaw, getElementKind, getFloatRaw, getIndexDifference, getInt, getInt, getInt, getInt, getInt, getIntRaw, getIterator, getIterator, getIteratorAtPos, getLongRaw, getLowBound, getNextKind, getNextTypeName, getNextTypeObject, getPosNext, getPosPrevious, getRowMajor, getShortRaw, getSize, getSize, gotoAttributesStart, gotoChildrenStart, gotoParent, hasNext, hasPrevious, indexOf, isAfterPos, isEmpty, iterator, lastIndexOf, listIterator, listIterator, nextIndex, nextIndex, nextMatching, nextPos, parentPos, previousPos, rank, releasePos, remove, remove, removeAll, removePos, removePosRange, retainAll, set, set, setAt, setBuffer, setPosNext, setPosPrevious, setRaw, stableCompare, startPos, subList, subSequence, subSequencePos, toArray, toArray, toString, unsupported, unsupportedExceptionclone, finalize, getClass, notify, notifyAll, wait, wait, waitasImmutable, effectiveIndex, effectiveIndex, effectiveIndex, effectiveIndex, get, get, get, get, get, getBooleanRaw, getByteRaw, getCharRaw, getDoubleRaw, getElementKind, getFloatRaw, getInt, getInt, getInt, getInt, getInt, getIntRaw, getLongRaw, getLowBound, getRowMajor, getShortRaw, getSize, getSize, isEmpty, rank, set, setRawadd, add, addAll, addAll, clear, contains, containsAll, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, sort, spliterator, subList, toArray, toArrayboundedHashpublic static IString valueOf(java.lang.CharSequence str)
public static IString valueOf(java.lang.CharSequence str, int start, int count)
public int effectiveIndex(int index)
effectiveIndex in interface Array<Char>effectiveIndex in class AbstractSequence<Char>public Char getRaw(int index)
Arraypublic int indexByCodePoints(int index)
public int offsetByCodePoints(int i)
i >=0 && i <= cplength.public int lengthByCodePoints()
public int size()
Sequencepublic char charAt(int i)
charAt in interface java.lang.CharSequencepublic java.lang.String toString()
toString in interface java.lang.CharSequencetoString in class AbstractSequence<Char>public int length()
length in interface java.lang.CharSequencepublic IString subSequence(int from, int to)
subSequence in interface java.lang.CharSequencepublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic char[] toCharArray()
public byte[] getBytes(java.lang.String charsetName)
throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingExceptionpublic void consume(Consumer out)
consume in interface Consumableconsume in class AbstractSequence<Char>public int hashCode()
hashCode in interface java.util.Collection<Char>hashCode in interface java.util.List<Char>hashCode in class AbstractSequence<Char>public boolean equals(java.lang.Object other)
equals in interface java.util.Collection<Char>equals in interface java.util.List<Char>equals in class AbstractSequence<Char>