@Internal public class TextPiece extends PropertyNode<TextPiece>
_buf, EndComparator, StartComparator| Constructor and Description | 
|---|
TextPiece(int start, int end, byte[] text, PieceDescriptor pd)  |  
          
TextPiece(int start, int end, byte[] text, PieceDescriptor pd, int cpStart)  |  
          
TextPiece(TextPiece other)  |  
          
| Modifier and Type | Method and Description | 
|---|---|
void |  
           adjustForDelete(int start, int length) 
             
             Deprecated.  
             (已弃用。) 
               |  
          
int |  
           bytesLength() 
            
              Returns the length, in bytes 
             (返回长度,以字节为单位) 
               |  
          
int |  
           characterLength() 
             
             Deprecated.  
             (已弃用。) 
               |  
          
TextPiece |  
           copy()  |  
          
boolean |  
           equals(java.lang.Object o)  |  
          
int |  
           getCP() 
            
              Returns the character position we start at. 
             (返回我们开始的字符位置。) 
               |  
          
PieceDescriptor |  
           getPieceDescriptor()  |  
          
byte[] |  
           getRawBytes()  |  
          
java.lang.StringBuffer |  
           getStringBuffer() 
             
             Deprecated.  
             (已弃用。) 
               |  
          
java.lang.StringBuilder |  
           getStringBuilder()  |  
          
int |  
           hashCode()  |  
          
boolean |  
           isUnicode()  |  
          
java.lang.String |  
           substring(int start, int end) 
             
             Deprecated.  
             (已弃用。) 
               |  
          
java.lang.String |  
           toString()  |  
          
compareTo, getEnd, getStart, limitsAreEqual, setEnd, setStartpublic TextPiece(TextPiece other)
public TextPiece(int start,
                 int end,
                 byte[] text,
                 PieceDescriptor pd,
                 int cpStart) 
          start - Beginning offset in main document stream, in characters. 
            (start - 主文档流中的起始偏移量,以字符为单位。) 
           end - Ending offset in main document stream, in characters. 
            (end - 主文档流中的结束偏移量,以字符为单位。) 
           text - The raw bytes of our text instead 
            (text - 我们文本的原始字节) 
           public TextPiece(int start,
                 int end,
                 byte[] text,
                 PieceDescriptor pd) 
          start - Beginning offset in main document stream, in characters. 
            (start - 主文档流中的起始偏移量,以字符为单位。) 
           end - Ending offset in main document stream, in characters. 
            (end - 主文档流中的结束偏移量,以字符为单位。) 
           text - The raw bytes of our text 
            (text - 我们文本的原始字节) 
           public boolean isUnicode()
public PieceDescriptor getPieceDescriptor()
@Deprecated public java.lang.StringBuffer getStringBuffer()
public java.lang.StringBuilder getStringBuilder()
public byte[] getRawBytes()
@Deprecated
public java.lang.String substring(int start,
                                              int end) 
          start - Local start position, in characters 
            (start - 本地开始位置,以字符为单位) 
           end - Local end position, in characters 
            (end - 本地结束位置,以字符为单位) 
           @Deprecated
public void adjustForDelete(int start,
                                        int length) 
          adjustForDelete in class  
            PropertyNode<TextPiece> 
           start - The start position for the delete, in characters 
            (start - 删除的开始位置,以字符为单位) 
           length - The number of characters to delete 
            (length - 要删除的字符数) 
           @Deprecated public int characterLength()
public int bytesLength()
public boolean equals(java.lang.Object o)
equals in class  
            PropertyNode<TextPiece> 
           public int hashCode()
hashCode in class  
            PropertyNode<TextPiece> 
           public int getCP()
public java.lang.String toString()
toString in class  
            java.lang.Object 
           public TextPiece copy()
copy in interface  
            Duplicatable 
            (复制到界面 Duplicatable) 
           copy in class  
            PropertyNode<TextPiece> 
            (在类 PropertyNode 中复制 
             Copyright 2021 The Apache Software Foundation or its licensors, as applicable.