01: // Copyright (c) 1998 Per M.A. Bothner.
02: // This is free software; for terms and warranty disclaimer see ./COPYING.
03:
04: package gnu.mapping;
05:
06: /** A Location is an abstract cell/location/variable with a value. */
07:
08: public abstract class Location extends Procedure0 implements HasSetter {
09: /** Get the current value of this location.
10: * @exception UnboundSymbol the location does not have a value. */
11: public abstract Object get();
12:
13: public abstract void set(Object value);
14:
15: public boolean isBound() {
16: return true;
17: }
18:
19: public Object apply0() {
20: return get();
21: }
22:
23: public void set0(Object value) {
24: set(value);
25: }
26: }
|