KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jicengine > element > AbstractElement


1 package org.jicengine.element;
2
3 /**
4  * implements the 'name' and the 'location' properties.
5  *
6  * <p>
7  * Copyright (C) 2004 Timo Laitinen
8  * </p>
9  *
10  * @author .timo
11  */

12
13 public abstract class AbstractElement implements Element {
14
15     private String JavaDoc name;
16     private Location location;
17
18     /**
19      * these two parameters shouldn't change during the lifetime of
20      * the Element, so given in the constructor.
21      *
22      * @param location Element interface doesn't include the location, but
23      * on the implementation level it is good that every
24      * Element knows its location.
25      */

26     public AbstractElement(String JavaDoc name, Location location)
27     {
28         this.name = name;
29         this.location = location;
30     }
31
32     public String JavaDoc getName()
33     {
34         return this.name;
35     }
36
37     public Location getLocation()
38     {
39         return this.location;
40     }
41 }
42
Popular Tags