dk.deepthought.sidious.goalhandler
Class Goal

java.lang.Object
  extended by dk.deepthought.sidious.goalhandler.Goal
All Implemented Interfaces:
java.lang.Comparable<Goal>

@Immutable
public class Goal
extends java.lang.Object
implements java.lang.Comparable<Goal>

This class represents a goal.

Author:
Deepthought

Field Summary
private  double desire
          The desire of this goal.
private  State goalState
          The goal state.
private static org.apache.commons.logging.Log logger
          Logger for this class
private  SuperLinkID origin
          The parent of this goal.
 
Constructor Summary
Goal(State goalState, double desire, SuperLinkID origin)
          Constructor; returns a new instance of Goal.
 
Method Summary
 int compareTo(Goal other)
           
 boolean equals(java.lang.Object obj)
           
 double getDesire()
          Returns the desire of this goal.
 State getGoalState()
          Returns the goal state of this goal.
 SuperLinkID getOrigin()
          Returns the id of the originating PlanRequester of this goal.
 int hashCode()
           
 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
Logger for this class


origin

private final SuperLinkID origin
The parent of this goal. I.e. the requester to whom it belongs.


goalState

private final State goalState
The goal state.


desire

private final double desire
The desire of this goal.

Constructor Detail

Goal

public Goal(State goalState,
            double desire,
            SuperLinkID origin)
Constructor; returns a new instance of Goal.

Parameters:
goalState - the desired goal state
desire - the desire of the goal
origin - id of the originating plan requester of this goal
Method Detail

getDesire

public double getDesire()
Returns the desire of this goal.

Returns:
the desire of this goal

getGoalState

public State getGoalState()
Returns the goal state of this goal.

Returns:
the goal state of this goal

getOrigin

public SuperLinkID getOrigin()
Returns the id of the originating PlanRequester of this goal.

Returns:
id of the origin of this goal

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

compareTo

public int compareTo(Goal other)
Specified by:
compareTo in interface java.lang.Comparable<Goal>


Copyright © Deepthought Development - All Rights Reserved.