EMMA Coverage Report (generated Tue May 01 18:46:53 CEST 2007)
[all classes][dk.deepthought.sidious.planner]

COVERAGE SUMMARY FOR SOURCE FILE [Plan.java]

nameclass, %method, %block, %line, %
Plan.java100% (1/1)86%  (6/7)64%  (28/44)91%  (10/11)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class Plan100% (1/1)86%  (6/7)64%  (28/44)91%  (10/11)
toString (): String 0%   (0/1)0%   (0/16)0%   (0/1)
Plan (): void 100% (1/1)100% (8/8)100% (3/3)
add (Step): void 100% (1/1)100% (6/6)100% (2/2)
getId (): SuperLinkID 100% (1/1)100% (3/3)100% (1/1)
getSteps (): Stack 100% (1/1)100% (3/3)100% (1/1)
setId (SuperLinkID): void 100% (1/1)100% (4/4)100% (2/2)
size (): int 100% (1/1)100% (4/4)100% (1/1)

1package dk.deepthought.sidious.planner;
2 
3import java.util.Stack;
4 
5import dk.deepthought.sidious.supportsystem.Step;
6import dk.deepthought.sidious.supportsystem.SuperLinkID;
7 
8/**
9 * This class represent a plan in the system.
10 * <p>
11 * The plan is accessed as a last-in-first-out (LIFO) stack.
12 * 
13 * @author Deepthought
14 * 
15 */
16public class Plan {
17 
18        /**
19         * The stack of steps.
20         */
21        private final Stack<Step> steps = new Stack<Step>();
22 
23        /**
24         * The id of the requester.
25         */
26        private SuperLinkID id;
27 
28        /**
29         * Empty default constructor.
30         */
31        public Plan() {
32        }
33 
34        /**
35         * Adds a <code>Step</code> to this <code>Plan</code>.
36         * 
37         * @param step
38         *            the <code>Step</code> to be added to this <code>Plan</code>
39         * 
40         */
41        public void add(Step step) {
42                steps.push(step);
43        }
44 
45        /**
46         * Gets the steps that make up this plan.
47         * @return the steps
48         */
49        public Stack<Step> getSteps() {
50                return steps;
51        }
52        
53        /**
54         * Returns the size plan. Which means the number of steps this plan consists
55         * of.
56         * 
57         * @return the size of the plan
58         */
59        public int size() {
60                return steps.size();
61        }
62 
63        /**
64         * Sets the id of the requester.
65         * 
66         * @param id
67         *            the id to set
68         */
69        public void setId(SuperLinkID id) {
70                this.id = id;
71        }
72 
73        /**
74         * Returns the id of the requester.
75         * 
76         * @return the id
77         */
78        public SuperLinkID getId() {
79                return id;
80        }
81 
82        /* (non-Javadoc)
83         * @see java.lang.Object#toString()
84         */
85        @Override
86        public String toString() {
87                return getClass().getSimpleName() + "[steps=" + steps + "]";
88        }
89 
90}

[all classes][dk.deepthought.sidious.planner]
EMMA 2.0.5312 (C) Vladimir Roubtsov