Package org.apache.poi.hpsf
Class CustomProperty
java.lang.Object
org.apache.poi.hpsf.Property
org.apache.poi.hpsf.CustomProperty
This class represents custom properties in the document summary
information stream. The difference to normal properties is that custom
properties have an optional name. If the name is not
null it
will be maintained in the section's dictionary.-
Field Summary
Fields inherited from class org.apache.poi.hpsf.Property
DEFAULT_CODEPAGE -
Constructor Summary
ConstructorsConstructorDescriptionCreates an emptyCustomProperty.CustomProperty(Property property) Creates aCustomPropertywithout a name by copying the underlyingProperty' attributes.CustomProperty(Property property, String name) Creates aCustomPropertywith a name. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTwo custom properties are equal if their names, ids, types and values are equal.booleanCompares two custom properties for equality.getName()Gets the property's name.voidSets the property's name.
-
Constructor Details
-
CustomProperty
public CustomProperty()Creates an emptyCustomProperty. The set methods must be called to make it usable. -
CustomProperty
Creates aCustomPropertywithout a name by copying the underlyingProperty' attributes.- Parameters:
property- the property to copy
-
CustomProperty
Creates aCustomPropertywith a name.- Parameters:
property- This property's attributes are copied to the new custom property.name- The new custom property's name.
-
-
Method Details
-
getName
Gets the property's name.- Returns:
- the property's name.
-
setName
Sets the property's name.- Parameters:
name- The name to set.
-
equalsContents
Compares two custom properties for equality. The method returnstrueif all attributes of the two custom properties are equal.- Parameters:
o- The custom property to compare with.- Returns:
trueif both custom properties are equal, elsefalse.- See Also:
-
equals
Two custom properties are equal if their names, ids, types and values are equal. A plainPropertyhas no name, so it is compared asProperty.equals(Object)does, which keeps the comparison symmetric.
-