public class UnicodeString extends java.lang.Object implements java.lang.Comparable<UnicodeString>, Duplicatable, GenericRecord
This is often called a XLUnicodeRichExtendedString in MS documentation.
Constructor and Description |
---|
UnicodeString(RecordInputStream in)
construct a unicode string record and fill its fields, ID is ignored
|
UnicodeString(java.lang.String str) |
Modifier and Type | Method and Description |
---|---|
void |
addFormatRun(FormatRun r)
Adds a font run to the formatted string.
|
void |
clearFormatting() |
int |
compareTo(UnicodeString str) |
UnicodeString |
copy() |
boolean |
equals(java.lang.Object o)
Our handling of equals is inconsistent with compareTo.
|
java.util.Iterator<FormatRun> |
formatIterator() |
java.util.Spliterator<FormatRun> |
formatSpliterator() |
int |
getCharCount()
get the number of characters in the string,
as an un-wrapped int
|
short |
getCharCountShort()
get the number of characters in the string,
wrapped as needed to fit within a short
|
java.lang.String |
getDebugInfo()
return a character representation of the fields of this record
|
ExtRst |
getExtendedRst() |
FormatRun |
getFormatRun(int index) |
int |
getFormatRunCount() |
java.util.Map<java.lang.String,java.util.function.Supplier<?>> |
getGenericProperties() |
byte |
getOptionFlags()
get the option flags which among other things return if this is a 16-bit or
8 bit string
|
java.lang.String |
getString() |
int |
hashCode() |
void |
removeFormatRun(FormatRun r) |
void |
serialize(ContinuableRecordOutput out)
Serialises out the String.
|
void |
setCharCount(short cc)
set the number of characters in the string
|
void |
setOptionFlags(byte of)
set the option flags which among other things return if this is a 16-bit or
8 bit string
|
void |
setString(java.lang.String string)
set the actual string this contains
|
void |
swapFontUse(short oldFontIndex,
short newFontIndex)
Swaps all use in the string of one font index
for use of a different font index.
|
java.lang.String |
toString()
unlike the real records we return the same as "getString()" rather than debug info
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getGenericChildren, getGenericRecordType
public UnicodeString(java.lang.String str)
public UnicodeString(RecordInputStream in)
in
- the RecordInputStream to read the record frompublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The object to compare.public int getCharCount()
public short getCharCountShort()
public void setCharCount(short cc)
cc
- - number of characterspublic byte getOptionFlags()
public void setOptionFlags(byte of)
of
- optionflags bitmaskpublic java.lang.String getString()
public void setString(java.lang.String string)
string
- the textpublic int getFormatRunCount()
public FormatRun getFormatRun(int index)
public void addFormatRun(FormatRun r)
public java.util.Iterator<FormatRun> formatIterator()
public java.util.Spliterator<FormatRun> formatSpliterator()
public void removeFormatRun(FormatRun r)
public void clearFormatting()
public ExtRst getExtendedRst()
public void swapFontUse(short oldFontIndex, short newFontIndex)
public java.lang.String toString()
toString
in class java.lang.Object
getDebugInfo()
public java.lang.String getDebugInfo()
public void serialize(ContinuableRecordOutput out)
public int compareTo(UnicodeString str)
compareTo
in interface java.lang.Comparable<UnicodeString>
public UnicodeString copy()
copy
in interface Duplicatable
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
getGenericProperties
in interface GenericRecord
Copyright 2022 The Apache Software Foundation or its licensors, as applicable.