public class CompressedWhitespace extends WhitespaceString
| Constructor and Description |
|---|
CompressedWhitespace(long compressedValue) |
| Modifier and Type | Method and Description |
|---|---|
int |
codePointAt(long index)
Get the code point at a given position in the string
|
IntIterator |
codePoints()
Get an iterator over the code points present in the string.
|
static UnicodeString |
compressWS(char[] in,
int start,
int len) |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
|
long |
getCompressedValue() |
int |
hashCode()
Compute a hashCode.
|
long |
length()
Get the length of the string
|
static int |
length(long value) |
int |
length32()
Get the length of the string, provided it is less than 2^31 characters
|
UnicodeString |
uncompress()
Uncompress the whitespace to a (normal) UnicodeString
|
static UnicodeString |
uncompress(long value) |
void |
write(UnicodeWriter writer)
Write the value to a Writer
|
void |
writeEscape(boolean[] specialChars,
UnicodeWriter writer)
Write the value to a Writer with escaping of special characters
|
getWidth, indexOf, substring, toStringasAtomic, checkSubstringBounds, compareTo, concat, economize, estimatedLength, hasSubstring, indexOf, indexOf, indexWhere, isEmpty, prefix, requireInt, substring, tidy, verifyCharacterspublic static UnicodeString compressWS(char[] in, int start, int len)
public UnicodeString uncompress()
uncompress in class WhitespaceStringpublic static UnicodeString uncompress(long value)
public long getCompressedValue()
public long length()
UnicodeStringlength in class UnicodeStringpublic int length32()
UnicodeStringlength32 in class UnicodeStringintpublic static int length(long value)
public int codePointAt(long index)
codePointAt in class UnicodeStringindex - the given position (0-based)java.lang.IndexOutOfBoundsException - if the index is out of rangepublic IntIterator codePoints()
UnicodeStringcodePoints in class UnicodeStringpublic boolean equals(java.lang.Object obj)
equals in class UnicodeStringpublic int hashCode()
UnicodeStringUnicodeString use compatible hash codes and the
hashing algorithm is therefore identical to that for java.lang.String. This means
that for strings containing Astral characters, the hash code needs to be computed by decomposing
an Astral character into a surrogate pair.hashCode in class UnicodeStringpublic void write(UnicodeWriter writer) throws java.io.IOException
write in class WhitespaceStringwriter - the writer to write tojava.io.IOException - if an error occurs downstreampublic void writeEscape(boolean[] specialChars,
UnicodeWriter writer)
throws java.io.IOException
writeEscape in class WhitespaceStringspecialChars - identifies which characters are considered specialwriter - the writer to write tojava.io.IOException - if an error occurs downstreamCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.