com.oakgrovesystems.reactor.processMediation
Class ProcessStateChange

java.lang.Object
  |
  +--com.oakgrovesystems.reactor.processMediation.ProcessStateChange
All Implemented Interfaces:
Change, ProcessChange, java.io.Serializable

public class ProcessStateChange
extends java.lang.Object
implements ProcessChange, java.io.Serializable

Changes the state of a Process obejct.

See Also:
Serialized Form

Constructor Summary
ProcessStateChange(int newState)
          Creates a new ProcessStateChange that changes the state to the specified state.
 
Method Summary
 void applyTo(java.lang.Object o)
          Changes the state of the Process specified
 int getNewState()
          Returns the state to which this ProcessStateChange changes a Process's state attribute
 boolean sameAs(java.lang.Object o)
          Compares two ProcessChanges for content equality.
 java.lang.String toString()
          Returns a String representation of this ProcessStateChange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProcessStateChange

public ProcessStateChange(int newState)
Creates a new ProcessStateChange that changes the state to the specified state.

Parameters:
newState - The state to which the Process's state attribute should be changed.
Method Detail

applyTo

public void applyTo(java.lang.Object o)
             throws ChangeNotApplicableException
Changes the state of the Process specified

Specified by:
applyTo in interface Change
Parameters:
o - the Process to which the change should be applied
Throws:
ChangeNotApplicableException - if the change can not be applied

getNewState

public final int getNewState()
Returns the state to which this ProcessStateChange changes a Process's state attribute

Returns:
The state to which this ProcessStateChange changes a Process's state attribute

toString

public java.lang.String toString()
Returns a String representation of this ProcessStateChange

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this ProcessStateChange

sameAs

public boolean sameAs(java.lang.Object o)
Compares two ProcessChanges for content equality. Instances of different classes are not equal

Specified by:
sameAs in interface ProcessChange
Parameters:
o - the object to compare for equality
Returns:
a boolean indicating whether or not the two objects are equal


Copyright (c) 1999-2004 Oak Grove Systems. All Rights Reserved.