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.Cloneable
,java.lang.Comparable<T>
- 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>, java.lang.Cloneable
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), useBytePropertyNode
between you and this.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PropertyNode.EndComparator
static class
PropertyNode.StartComparator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
adjustForDelete(int start, int length)
Adjust for a deletion that can span multiple PropertyNodes.T
clone()
int
compareTo(T o)
Used for sorting in collections.boolean
equals(java.lang.Object o)
int
getEnd()
int
getStart()
int
hashCode()
void
setEnd(int end)
void
setStart(int start)
-
-
-
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.- Parameters:
start
-length
-
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
clone
public T clone() throws java.lang.CloneNotSupportedException
- Throws:
java.lang.CloneNotSupportedException
-
compareTo
public int compareTo(T o)
Used for sorting in collections.- Specified by:
compareTo
in interfacejava.lang.Comparable<T extends PropertyNode<T>>
-
-