dk.deepthought.sidious.planner
Class Plan

java.lang.Object
  extended by dk.deepthought.sidious.planner.Plan

public class Plan
extends java.lang.Object

This class represent a plan in the system.

The plan is accessed as a last-in-first-out (LIFO) stack.

Author:
Deepthought

Field Summary
private  SuperLinkID id
          The id of the requester.
private  java.util.Stack<Step> steps
          The stack of steps.
 
Constructor Summary
Plan()
          Empty default constructor.
 
Method Summary
 void add(Step step)
          Adds a Step to this Plan.
 SuperLinkID getId()
          Returns the id of the requester.
 java.util.Stack<Step> getSteps()
          Gets the steps that make up this plan.
 void setId(SuperLinkID id)
          Sets the id of the requester.
 int size()
          Returns the size plan.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

steps

private final java.util.Stack<Step> steps
The stack of steps.


id

private SuperLinkID id
The id of the requester.

Constructor Detail

Plan

public Plan()
Empty default constructor.

Method Detail

add

public void add(Step step)
Adds a Step to this Plan.

Parameters:
step - the Step to be added to this Plan

getSteps

public java.util.Stack<Step> getSteps()
Gets the steps that make up this plan.

Returns:
the steps

size

public int size()
Returns the size plan. Which means the number of steps this plan consists of.

Returns:
the size of the plan

setId

public void setId(SuperLinkID id)
Sets the id of the requester.

Parameters:
id - the id to set

getId

public SuperLinkID getId()
Returns the id of the requester.

Returns:
the id

toString

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


Copyright © Deepthought Development - All Rights Reserved.