dk.deepthought.sidious.supportsystem
Class Step

java.lang.Object
  extended by dk.deepthought.sidious.supportsystem.Step

public class Step
extends java.lang.Object

This class represents a list of Adjustable objects and their setting.

Author:
Deepthought

Field Summary
private  java.util.Collection<Adjustable> adjustables
          The adjustables of this.
private  Explanation explanation
          The explanation of this.
private static org.apache.commons.logging.Log logger
          The logger for this class.
 
Constructor Summary
Step(java.util.Collection<Adjustable> adjustables)
          Constructs a new Step object, specified by the input adjustables.
 
Method Summary
 State consequence(State state)
          Calculates the consequence of applying the adjustments of this step to the input state.
 boolean equals(java.lang.Object obj)
           
 java.util.Collection<Adjustable> getAdjustables()
          Returns the adjustables of this step.
 Explanation getExplanation()
          Gets the explanation of this.
 java.util.Collection<Step> getSteps()
          Returns all possible steps emanating from this step.
 int hashCode()
           
 void setExplanation(Explanation explanation)
          Sets the explanation of this.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

private static final org.apache.commons.logging.Log logger
The logger for this class.


adjustables

private final java.util.Collection<Adjustable> adjustables
The adjustables of this.


explanation

private Explanation explanation
The explanation of this.

Constructor Detail

Step

public Step(java.util.Collection<Adjustable> adjustables)
Constructs a new Step object, specified by the input adjustables.

The input adjustables are copied defensively.

If the input collection is null an empty step is created. This is to facilitate graphs that do not utilize steps.

Parameters:
adjustables - adjustables associated with this step
Method Detail

getSteps

public java.util.Collection<Step> getSteps()
Returns all possible steps emanating from this step.

The possible steps are calculated by collecting and combining all possible adjustments of all adjustables of this step.

Returns:
all possible steps emanating from this step

consequence

public State consequence(State state)
Calculates the consequence of applying the adjustments of this step to the input state.

Parameters:
state - the input state
Returns:
the calculated consequence

getAdjustables

public java.util.Collection<Adjustable> getAdjustables()
Returns the adjustables of this step.

Returns:
the adjustables of this step

setExplanation

public void setExplanation(Explanation explanation)
Sets the explanation of this.

Parameters:
explanation - the explanation

getExplanation

public Explanation getExplanation()
Gets the explanation of this.

Returns:
the explanation

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © Deepthought Development - All Rights Reserved.