KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > controller > actionflow > config > BaseLink


1 /*
2  * Copyright (c) 2003, Inversoft
3  *
4  * This software is distribuable under the GNU Lesser General Public License.
5  * For more information visit gnu.org.
6  */

7 package com.inversoft.verge.mvc.controller.actionflow.config;
8
9
10 /**
11  * This class is the base implementation of the Link
12  * interface.
13  *
14  * @author Brian Pontarelli
15  * @since 2.0
16  * @version 2.0
17  */

18 public abstract class BaseLink implements Link {
19
20     private Node origin;
21     private Node destination;
22
23
24     /**
25      * Constructs a new <code>BaseLink</code> with the given origin Node and
26      * destination Node.
27      *
28      * @param origin The origin Node
29      * @param destination The destination Node
30      */

31     public BaseLink(Node origin, Node destination) {
32
33         if (origin == null || destination == null) {
34             throw new IllegalArgumentException JavaDoc("The origin and/or destination are null");
35         }
36
37         this.origin = origin;
38         this.destination = destination;
39     }
40
41
42     /**
43      * Gets the origin Node of this link
44      *
45      * @return Returns the origin Node of this link
46      */

47     public Node getOrigin() {
48         return origin;
49     }
50     
51     /**
52      * Gets the destination Node of this link
53      *
54      * @return Returns the destination Node of this link
55      */

56     public Node getDestination() {
57         return destination;
58     }
59 }
60
61
Popular Tags