Package loci.poi.hpsf
Class CustomProperty
- java.lang.Object
-
- loci.poi.hpsf.Property
-
- loci.poi.hpsf.MutableProperty
-
- loci.poi.hpsf.CustomProperty
-
public class CustomProperty extends MutableProperty
This class represents custum 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.- Since:
- 2006-02-09
- Version:
- $Id$
- Author:
- Rainer Klute <klute@rainer-klute.de>
-
-
Constructor Summary
Constructors Constructor Description CustomProperty()
Creates an emptyCustomProperty
.CustomProperty(Property property)
Creates aCustomProperty
without a name by copying the underlyingProperty
' attributes.CustomProperty(Property property, String name)
Creates aCustomProperty
with a name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equalsContents(Object o)
Compares two custom properties for equality.String
getName()
Gets the property's name.int
hashCode()
void
setName(String name)
Sets the property's name.-
Methods inherited from class loci.poi.hpsf.MutableProperty
setID, setType, setValue, write
-
-
-
-
Constructor Detail
-
CustomProperty
public CustomProperty()
Creates an empty
CustomProperty
. The set methods must be called to make it usable.
-
CustomProperty
public CustomProperty(Property property)
Creates a
CustomProperty
without a name by copying the underlyingProperty
' attributes.- Parameters:
property
- the property to copy
-
CustomProperty
public CustomProperty(Property property, String name)
Creates a
CustomProperty
with a name.- Parameters:
property
- This property's attributes are copied to the new custom property.name
- The new custom property's name.
-
-
Method Detail
-
getName
public String getName()
Gets the property's name.
- Returns:
- the property's name.
-
setName
public void setName(String name)
Sets the property's name.
- Parameters:
name
- The name to set.
-
equalsContents
public boolean equalsContents(Object o)
Compares two custom properties for equality. The method returns
true
if all attributes of the two custom properties are equal.- Parameters:
o
- The custom property to compare with.- Returns:
true
if both custom properties are equal, elsefalse
.- See Also:
AbstractSet.equals(java.lang.Object)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classProperty
- See Also:
AbstractSet.hashCode()
-
-