public class UnicodeString extends java.lang.Object implements java.lang.Comparable<UnicodeString>, Duplicatable, GenericRecord
This is often called a XLUnicodeRichExtendedString in MS documentation.
(Unicode 字符串 - 只是多个记录中的标准字段。它被认为比在所有这些中重复它更可取。这在 MS 文档中通常称为 XLUnicodeRichExtendedString。)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.
(我们对 equals 的处理与 compareTo 不一致。)
|
java.util.Iterator<FormatRun> |
formatIterator() |
int |
getCharCount()
get the number of characters in the string, as an un-wrapped int
(获取字符串中的字符数,作为未包装的 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
(获取选项标志,如果这是一个 16 位或 8 位字符串,则返回这些标志)
|
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
(设置选项标志,如果这是一个 16 位或 8 位字符串,则返回这些标志)
|
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
(与真实记录不同,我们返回与“getString()”相同而不是调试信息)
|
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 from
(in - 要从中读取记录的 RecordInputstream)
public 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.
(o - 要比较的对象。)
public int getCharCount()
public short getCharCountShort()
public void setCharCount(short cc)
cc
- - number of characters
(cc - - 字符数)
public byte getOptionFlags()
public void setOptionFlags(byte of)
of
- optionflags bitmask
(of - optionflags 位掩码)
public java.lang.String getString()
public void setString(java.lang.String string)
string
- the text
(字符串 - 文本)
public int getFormatRunCount()
public FormatRun getFormatRun(int index)
public void addFormatRun(FormatRun r)
public java.util.Iterator<FormatRun> formatIterator()
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>
(接口 java.lang.Comparable 中的 compareTo
public UnicodeString copy()
copy
in interface
Duplicatable
(复制到界面 Duplicatable)
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
getGenericProperties
in interface
GenericRecord
(接口 GenericRecord 中的 getGenericProperties)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.