01: package org.jicengine.element;
02:
03: /**
04: * implements the 'name' and the 'location' properties.
05: *
06: * <p>
07: * Copyright (C) 2004 Timo Laitinen
08: * </p>
09: *
10: * @author .timo
11: */
12:
13: public abstract class AbstractElement implements Element {
14:
15: private String 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 name, Location location) {
27: this .name = name;
28: this .location = location;
29: }
30:
31: public String getName() {
32: return this .name;
33: }
34:
35: public Location getLocation() {
36: return this.location;
37: }
38: }
|