net.dpml.library.info
Class AbstractDirective

java.lang.Object
  extended by net.dpml.library.info.AbstractDirective
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BuilderDirective, DataDirective, DependencyDirective, ImportDirective, IncludeDirective, LibraryDirective, ListenerDirective, ResourceDirective

public abstract class AbstractDirective
extends Object
implements Serializable

The ModuleDirective class describes a module data-structure.

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

Constructor Summary
AbstractDirective()
          Creation of a new abstract directive.
AbstractDirective(Properties properties)
          Creation of a new abstract directive.
 
Method Summary
 boolean equals(Object other)
          Compare this object to the supplied object for equality.
protected  boolean equals(Object a, Object b)
          Utility to compare two object for equality.
 Properties getProperties()
          Return a property set.
 String getProperty(String key)
          Return a property value.
protected  int hashArray(Object[] array)
          Utility to hash an array.
 int hashCode()
          Calculate the hashcode.
protected  int hashValue(Object value)
          Utility to hash an object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDirective

public AbstractDirective()
Creation of a new abstract directive.


AbstractDirective

public AbstractDirective(Properties properties)
Creation of a new abstract directive.

Parameters:
properties - the properties associated with the directive
Method Detail

getProperty

public String getProperty(String key)
Return a property value.

Parameters:
key - the property key
Returns:
the property value

getProperties

public Properties getProperties()
Return a property set.

Returns:
the properties

equals

public boolean equals(Object other)
Compare this object to the supplied object for equality.

Overrides:
equals in class Object
Parameters:
other - the other object
Returns:
true if equal

hashCode

public int hashCode()
Calculate the hashcode.

Overrides:
hashCode in class Object
Returns:
the hashcode value

hashArray

protected int hashArray(Object[] array)
Utility to hash an array.

Parameters:
array - the array
Returns:
the hash value

hashValue

protected int hashValue(Object value)
Utility to hash an object.

Parameters:
value - the object
Returns:
the hash value

equals

protected boolean equals(Object a,
                         Object b)
Utility to compare two object for equality.

Parameters:
a - the first object
b - the second object
Returns:
true if the objects are equal