Package org.apache.poi.hpsf
Class CustomProperty
- java.lang.Object
- 
- org.apache.poi.hpsf.Property
- 
- org.apache.poi.hpsf.CustomProperty
 
 
- 
 public class CustomProperty extends Property 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 notnullit will be maintained in the section's dictionary.
- 
- 
Field Summary- 
Fields inherited from class org.apache.poi.hpsf.PropertyDEFAULT_CODEPAGE
 
- 
 - 
Constructor SummaryConstructors Constructor Description CustomProperty()Creates an emptyCustomProperty.CustomProperty(Property property)Creates aCustomPropertywithout a name by copying the underlyingProperty' attributes.CustomProperty(Property property, String name)Creates aCustomPropertywith a name.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Compares two properties.booleanequalsContents(Object o)Compares two custom properties for equality.StringgetName()Gets the property's name.inthashCode()voidsetName(String name)Sets the property's name.
 
- 
- 
- 
Constructor Detail- 
CustomPropertypublic CustomProperty() Creates an emptyCustomProperty. The set methods must be called to make it usable.
 - 
CustomPropertypublic CustomProperty(Property property) Creates aCustomPropertywithout a name by copying the underlyingProperty' attributes.- Parameters:
- property- the property to copy
 
 - 
CustomPropertypublic CustomProperty(Property property, String name) 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 Detail- 
getNamepublic String getName() Gets the property's name.- Returns:
- the property's name.
 
 - 
setNamepublic void setName(String name) Sets the property's name.- Parameters:
- name- The name to set.
 
 - 
equalsContentspublic boolean equalsContents(Object o) 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, else- false.
- See Also:
- AbstractSet.equals(java.lang.Object)
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- Property
- See Also:
- AbstractSet.hashCode()
 
 - 
equalspublic boolean equals(Object o) Description copied from class:PropertyCompares two properties.Please beware that a property with ID == 0 is a special case: It does not have a type, and its value is the section's dictionary. Another special case are strings: Two properties may have the different types Variant.VT_LPSTR and Variant.VT_LPWSTR; 
 
- 
 
-