Package org.apache.poi.hwpf.model
Class PropertyNode<T extends PropertyNode<T>>
java.lang.Object
org.apache.poi.hwpf.model.PropertyNode<T>
- All Implemented Interfaces:
Comparable<T>,Duplicatable
- Direct Known Subclasses:
BytePropertyNode,GenericPropertyNode,SEPX,TextPiece
@Internal
public abstract class PropertyNode<T extends PropertyNode<T>>
extends Object
implements 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
FieldsModifier and TypeFieldDescriptionprotected Objectstatic final Comparator<PropertyNode<?>>static final Comparator<PropertyNode<?>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPropertyNode(int fcStart, int fcEnd, Object buf) protectedPropertyNode(PropertyNode<T> other) -
Method Summary
Modifier and TypeMethodDescriptionvoidadjustForDelete(int start, int length) Adjust for a deletion that can span multiple PropertyNodes.intUsed for sorting in collections.abstract PropertyNode<?>copy()booleanintgetEnd()intgetStart()inthashCode()protected booleanvoidsetEnd(int end) voidsetStart(int start)
-
Field Details
-
EndComparator
-
StartComparator
-
_buf
-
-
Constructor Details
-
PropertyNode
-
PropertyNode
- 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 Details
-
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
-
hashCode
public int hashCode() -
equals
-
copy
- Specified by:
copyin interfaceDuplicatable- Returns:
- a deep copy of the implementing class / instance
-
compareTo
Used for sorting in collections.- Specified by:
compareToin interfaceComparable<T extends PropertyNode<T>>
-