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:
java.lang.Comparable<T>,org.apache.poi.common.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>, org.apache.poi.common.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), useBytePropertyNodebetween you and this.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Comparator<PropertyNode<?>>EndComparatorstatic java.util.Comparator<PropertyNode<?>>StartComparator
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidadjustForDelete(int start, int length)Adjust for a deletion that can span multiple PropertyNodes.intcompareTo(T o)Used for sorting in collections.abstract PropertyNode<?>copy()booleanequals(java.lang.Object o)intgetEnd()intgetStart()inthashCode()voidsetEnd(int end)voidsetStart(int start)
-
-
-
Field Detail
-
EndComparator
public static final java.util.Comparator<PropertyNode<?>> EndComparator
-
StartComparator
public static final java.util.Comparator<PropertyNode<?>> StartComparator
-
-
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.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
copy
public abstract PropertyNode<?> copy()
- Specified by:
copyin interfaceorg.apache.poi.common.Duplicatable
-
compareTo
public int compareTo(T o)
Used for sorting in collections.- Specified by:
compareToin interfacejava.lang.Comparable<T extends PropertyNode<T>>
-
-