org.apache.poi.hwpf.model

## Class PropertyNode<T extends PropertyNode<T>>

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

- All Implemented Interfaces:
    java.lang.Comparable<T>, Duplicatable
  Direct Known Subclasses:
    BytePropertyNode, GenericPropertyNode, SEPX, TextPiece

      @Internal
      public abstract class PropertyNode<T extends PropertyNode<T>>
      extends java.lang.Object
      implements java.lang.Comparable<T>, Duplicatable

  Represents a lightweight node in the Trees used to store content properties. This only ever works in characters. For the few odd cases when the start and end aren't in characters (eg PAPX and CHPX), use `BytePropertyNode` between you and this.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.Object` | `_buf`
    `static java.util.Comparator<PropertyNode<?>>` | `EndComparator`
    `static java.util.Comparator<PropertyNode<?>>` | `StartComparator`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `PropertyNode(int fcStart, int fcEnd, java.lang.Object buf)`
    `protected` | `PropertyNode(PropertyNode<T> other)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `adjustForDelete(int start, int length)` Adjust for a deletion that can span multiple PropertyNodes.
    `T` | `clone()` Deprecated.
    `int` | `compareTo(T o)` Used for sorting in collections.
    `abstract PropertyNode<?>` | `copy()`
    `boolean` | `equals(java.lang.Object o)`
    `int` | `getEnd()`
    `int` | `getStart()`
    `int` | `hashCode()`
    `protected boolean` | `limitsAreEqual(java.lang.Object o)`
    `void` | `setEnd(int end)`
    `void` | `setStart(int start)`

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

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

- - ### Field Detail

    - #### EndComparator

          public static final java.util.Comparator<PropertyNode<?>> EndComparator

    - #### StartComparator

          public static final java.util.Comparator<PropertyNode<?>> StartComparator

    - #### _buf

          protected java.lang.Object _buf

  - ### Constructor Detail

    - #### PropertyNode

          protected PropertyNode(PropertyNode<T> other)

    - #### PropertyNode

          protected PropertyNode(int fcStart,
                                 int fcEnd,
                                 java.lang.Object buf)

      Parameters:
        `fcStart` - The start of the text for this property, in characters.
        `fcEnd` - The end of the text for this property, in characters.
        `buf` - FIXME: Old documentation is: "grpprl The property description in compressed form."

  - ### Method Detail

    - #### getStart

          public int getStart()

      Returns:
        The start offset of this property's text.

    - #### setStart

          public void setStart(int start)

    - #### getEnd

          public int getEnd()

      Returns:
        The offset of the end of this property's text.

    - #### setEnd

          public void setEnd(int end)

    - #### adjustForDelete

          public void adjustForDelete(int start,
                                      int length)

      Adjust for a deletion that can span multiple PropertyNodes.

    - #### limitsAreEqual

          protected boolean limitsAreEqual(java.lang.Object o)

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### clone

          @Deprecated
           @Removal(version="5.0.0")
          public T clone()

      Deprecated.
      Overrides:
        `clone` in class `java.lang.Object`

    - #### copy

          public abstract PropertyNode<?> copy()

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

    - #### compareTo

          public int compareTo(T o)

      Used for sorting in collections.
      Specified by:
        `compareTo` in interface `java.lang.Comparable<T extends PropertyNode<T>>`

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