net.dpml.state
Class DefaultOperation

java.lang.Object
  extended bynet.dpml.state.DefaultOperation
All Implemented Interfaces:
Action, Operation, Serializable

public class DefaultOperation
extends Object
implements Operation, Serializable

Default implementation of an operation.

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

Constructor Summary
DefaultOperation(String name)
          Creation of a new operation.
DefaultOperation(String name, String method)
          Creation of a new operation.
 
Method Summary
 boolean equals(Object other)
          Compare this object to another for equality.
 String getMethodName()
          Return the optional overriding method name.
 String getName()
          Return the action name.
 int hashCode()
          Compute the hashcode for this 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

DefaultOperation

public DefaultOperation(String name)
                 throws NullPointerException
Creation of a new operation.

Parameters:
name - the operation name
Throws:
NullPointerException - if the operation name is null

DefaultOperation

public DefaultOperation(String name,
                        String method)
                 throws NullPointerException
Creation of a new operation.

Parameters:
name - the operation name
method - the overriding method name
Throws:
NullPointerException - if the operation name is null
Method Detail

getName

public String getName()
Return the action name.

Specified by:
getName in interface Action
Returns:
the name

getMethodName

public String getMethodName()
Return the optional overriding method name. If the value returned is null the method shall be assumed to be the equivalent of "get[Name]().

Specified by:
getMethodName in interface Operation
Returns:
the operation method name

toString

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

Returns:
the string value

equals

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

Parameters:
other - the other object
Returns:
true if the object is equal to this object

hashCode

public int hashCode()
Compute the hashcode for this instance.

Returns:
the hashcode value