public class TextPropCollection extends java.lang.Object implements GenericRecord, Duplicatable
Modifier and Type | Class and Description |
---|---|
static class |
TextPropCollection.TextPropType |
Constructor and Description |
---|
TextPropCollection(int charactersCovered, TextPropCollection.TextPropType textPropType)
Create a new collection of text properties (be they paragraph or character) which will be groked via a subsequent call to buildTextPropList().
|
TextPropCollection(TextPropCollection other) |
Modifier and Type | Method and Description |
---|---|
void |
addProp(TextProp textProp)
Add the property at the correct position.
(在正确的位置添加属性。)
|
<T extends TextProp> |
addWithName(java.lang.String name)
Add the TextProp with this name to the list
(将具有此名称的 TextProp 添加到列表中)
|
int |
buildTextPropList(int containsField, byte[] data, int dataOffset)
For an existing set of text properties, build the list of properties coded for in a given run of properties.
(对于现有的一组文本属性,构建在给定的属性运行中编码的属性列表。)
|
TextPropCollection |
copy()
Clones the given text properties
(克隆给定的文本属性)
|
boolean |
equals(java.lang.Object other)
compares most properties apart of the covered characters length
(比较除覆盖字符长度之外的大多数属性)
|
<T extends TextProp> |
findByName(java.lang.String textPropName)
Fetch the TextProp with this name, or null if it isn't present
(获取具有此名称的 TextProp,如果不存在则为 null)
|
int |
getCharactersCovered()
Fetch the number of characters this styling applies to
(获取此样式适用的字符数)
|
java.util.Map<java.lang.String,java.util.function.Supplier<?>> |
getGenericProperties() |
short |
getIndentLevel() |
int |
getSpecialMask() |
java.util.List<TextProp> |
getTextPropList()
Fetch the TextProps that define this styling in the record order
(获取按记录顺序定义此样式的 TextProps)
|
TextPropCollection.TextPropType |
getTextPropType() |
int |
hashCode() |
<T extends TextProp> |
removeByName(java.lang.String name) |
void |
setIndentLevel(short indentLevel) |
java.lang.String |
toString() |
void |
updateTextSize(int textSize)
Update the size of the text that this set of properties applies to
(更新这组属性适用的文本大小)
|
void |
writeOut(java.io.OutputStream o)
Writes out to disk the header, and then all the properties
(将标头写入磁盘,然后将所有属性写入磁盘)
|
void |
writeOut(java.io.OutputStream o, boolean isMasterStyle)
Writes out to disk the header, and then all the properties
(将标头写入磁盘,然后将所有属性写入磁盘)
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getGenericChildren, getGenericRecordType
public TextPropCollection(int charactersCovered, TextPropCollection.TextPropType textPropType)
public TextPropCollection(TextPropCollection other)
public int getSpecialMask()
public int getCharactersCovered()
public java.util.List<TextProp> getTextPropList()
public final <T extends TextProp> T findByName(java.lang.String textPropName)
public final <T extends TextProp> T removeByName(java.lang.String name)
public final TextPropCollection.TextPropType getTextPropType()
public final <T extends TextProp> T addWithName(java.lang.String name)
public final void addProp(TextProp textProp)
textProp
- the property to be added
(textProp - 要添加的属性)
public int buildTextPropList(int containsField, byte[] data, int dataOffset)
public TextPropCollection copy()
copy
in interface
Duplicatable
(复制到界面 Duplicatable)
public void updateTextSize(int textSize)
public void writeOut(java.io.OutputStream o) throws java.io.IOException
java.io.IOException
(java.io.IOException)
public void writeOut(java.io.OutputStream o, boolean isMasterStyle) throws java.io.IOException
java.io.IOException
(java.io.IOException)
public short getIndentLevel()
public void setIndentLevel(short indentLevel)
public int hashCode()
hashCode
in class
java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class
java.lang.Object
public java.lang.String toString()
toString
in class
java.lang.Object
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.