net.dpml.metro.info
Class PartReference

java.lang.Object
  extended bynet.dpml.metro.info.PartReference
All Implemented Interfaces:
Comparable, Serializable

public class PartReference
extends Object
implements Serializable, Comparable

A PartReference is a serializable object that contains a key and an associated part.

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

Constructor Summary
PartReference(String key, Directive directive)
          Creation of a new part reference.
PartReference(String key, Directive directive, int priority)
          Creation of a new part reference.
 
Method Summary
 int compareTo(Object other)
          Compare this object with the supplied object.
 boolean equals(Object other)
          Test if the supplied object is equal to this object.
 Directive getDirective()
          Return the directive.
 String getKey()
          Return the key.
 int getPriority()
          Return the priority value.
 int hashCode()
          Return the hashcode for the instance.
 String toString()
          Return a string representation of the instance.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PartReference

public PartReference(String key,
                     Directive directive)
Creation of a new part reference.

Parameters:
key - the key identifying this part within the scope of its container
directive - the directive

PartReference

public PartReference(String key,
                     Directive directive,
                     int priority)
Creation of a new part reference.

Parameters:
key - the key identifying this part within the scope of its container
directive - the directive
priority - the relative priority
Method Detail

getKey

public String getKey()
Return the key.

Returns:
the key

getDirective

public Directive getDirective()
Return the directive.

Returns:
the directive

getPriority

public int getPriority()
Return the priority value.

Returns:
the priority ranking of this reference

compareTo

public int compareTo(Object other)
Compare this object with the supplied object.

Specified by:
compareTo in interface Comparable
Parameters:
other - the object to compare with
Returns:
the result

equals

public boolean equals(Object other)
Test if the supplied object is equal to this object.

Parameters:
other - the object to compare with this instance
Returns:
TRUE if the supplied object is equal to this object

hashCode

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

Returns:
the instance hashcode

toString

public String toString()
Return a string representation of the instance.

Returns:
the string representation