public class CustomProperty extends Property
null
it
will be maintained in the section's dictionary.DEFAULT_CODEPAGE
Constructor and Description |
---|
CustomProperty()
Creates an empty
CustomProperty . |
CustomProperty(Property property)
Creates a
CustomProperty without a name by copying the
underlying Property ' attributes. |
CustomProperty(Property property,
java.lang.String name)
Creates a
CustomProperty with a name. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Compares two properties.
|
boolean |
equalsContents(java.lang.Object o)
Compares two custom properties for equality.
|
java.lang.String |
getName()
Gets the property's name.
|
int |
hashCode() |
void |
setName(java.lang.String name)
Sets the property's name.
|
public CustomProperty()
CustomProperty
. The set methods must be
called to make it usable.public CustomProperty(Property property)
CustomProperty
without a name by copying the
underlying Property
' attributes.property
- the property to copypublic CustomProperty(Property property, java.lang.String name)
CustomProperty
with a name.property
- This property's attributes are copied to the new custom
property.name
- The new custom property's name.public java.lang.String getName()
public void setName(java.lang.String name)
name
- The name to set.public boolean equalsContents(java.lang.Object o)
true
if all attributes of the two custom properties are
equal.o
- The custom property to compare with.true
if both custom properties are equal, else
false
.AbstractSet.equals(java.lang.Object)
public int hashCode()
public boolean equals(java.lang.Object o)
Property
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;
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.