org.apache.poi.hwpf.model

## Class SinglentonTextPiece

- java.lang.Object
- - org.apache.poi.hwpf.model.PropertyNode<TextPiece>
  - - org.apache.poi.hwpf.model.TextPiece
    - - org.apache.poi.hwpf.model.SinglentonTextPiece

- All Implemented Interfaces:
    java.lang.Comparable<TextPiece>, Duplicatable

      @Internal
      public class SinglentonTextPiece
      extends TextPiece

- - ### Field Summary

    - ### Fields inherited from class org.apache.poi.hwpf.model.PropertyNode

      `_buf, EndComparator, StartComparator`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SinglentonTextPiece(SinglentonTextPiece other)`
    `SinglentonTextPiece(java.lang.StringBuilder buffer)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `bytesLength()` Returns the length, in bytes
    `int` | `characterLength()` Returns the length, in characters
    `SinglentonTextPiece` | `copy()`
    `int` | `getCP()` Returns the character position we start at.
    `int` | `getEnd()`
    `int` | `getStart()`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class org.apache.poi.hwpf.model.TextPiece

      `adjustForDelete, equals, getPieceDescriptor, getRawBytes, getStringBuffer, getStringBuilder, hashCode, isUnicode, substring`

    - ### Methods inherited from class org.apache.poi.hwpf.model.PropertyNode

      `clone, compareTo, limitsAreEqual, setEnd, setStart`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SinglentonTextPiece

          public SinglentonTextPiece(SinglentonTextPiece other)

    - #### SinglentonTextPiece

          public SinglentonTextPiece(java.lang.StringBuilder buffer)

  - ### Method Detail

    - #### bytesLength

          public int bytesLength()

      Description copied from class: `TextPiece`
      Returns the length, in bytes
      Overrides:
        `bytesLength` in class `TextPiece`

    - #### characterLength

          public int characterLength()

      Description copied from class: `TextPiece`
      Returns the length, in characters
      Overrides:
        `characterLength` in class `TextPiece`

    - #### getCP

          public int getCP()

      Description copied from class: `TextPiece`
      Returns the character position we start at.
      Overrides:
        `getCP` in class `TextPiece`

    - #### getEnd

          public int getEnd()

      Overrides:
        `getEnd` in class `PropertyNode<TextPiece>`
      Returns:
        The offset of the end of this property's text.

    - #### getStart

          public int getStart()

      Overrides:
        `getStart` in class `PropertyNode<TextPiece>`
      Returns:
        The start offset of this property's text.

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `TextPiece`

    - #### copy

          public SinglentonTextPiece copy()

      Specified by:
        `copy` in interface `Duplicatable`
      Overrides:
        `copy` in class `TextPiece`
      Returns:
        a deep copy of the implementing class / instance

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.