net.dpml.metro.info
Class Descriptor

java.lang.Object
  extended by net.dpml.metro.info.Descriptor
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CategoryDescriptor, InfoDescriptor

public abstract class Descriptor
extends Object
implements Serializable

This is the Abstract class for all feature feature descriptors.

Version:
1.0.4
Author:
Digital Product Meta Library
See Also:
Serialized Form

Constructor Summary
protected Descriptor(Properties attributes)
          Creation of an abstract descriptor.
 
Method Summary
 boolean equals(Object other)
          Compare this object with another for equality.
 String getAttribute(String key)
          Return the attribute for specified key.
 String getAttribute(String key, String defaultValue)
          Return the attribute for specified key.
 String[] getAttributeNames()
          Returns the set of attribute names available under this descriptor.
 Properties getProperties()
          Returns the property set.
 int hashCode()
          Return the hashcode for the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Descriptor

protected Descriptor(Properties attributes)
Creation of an abstract descriptor.

Parameters:
attributes - the set of attributes to assign to the descriptor
Method Detail

getAttribute

public String getAttribute(String key)
Return the attribute for specified key.

Parameters:
key - the attribute key to resolve
Returns:
the attribute for specified key.

getAttribute

public String getAttribute(String key,
                           String defaultValue)
Return the attribute for specified key.

Parameters:
key - the attribute key to resolve
defaultValue - the default value to use if the value is not defined
Returns:
the attribute for specified key.

getAttributeNames

public String[] getAttributeNames()
Returns the set of attribute names available under this descriptor.

Returns:
an array of the properties names held by the descriptor.

equals

public boolean equals(Object other)
Compare this object with another for equality.

Overrides:
equals in class Object
Parameters:
other - the object to compare this object with
Returns:
TRUE if the supplied object equivalent

hashCode

public int hashCode()
Return the hashcode for the object.

Overrides:
hashCode in class Object
Returns:
the hashcode value

getProperties

public Properties getProperties()
Returns the property set.

Returns:
the property set.