public abstract class Location<T>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
UNBOUND
Magic value used to indicate there is no property binding.
|
| Constructor and Description |
|---|
Location () |
| Modifier and Type | Method and Description |
|---|---|
static Location |
define (Symbol name)
Implement top-level 'define' for Scheme in interactive mode.
|
boolean |
entered ()
True if directly entered in an Environment.
|
abstract T |
get ()
Get the current value of this location.
|
T |
get (T defaultValue) |
Location |
getBase () |
java.lang.Object |
getKeyProperty () |
Symbol |
getKeySymbol () |
T |
getValue () |
abstract boolean |
isBound () |
boolean |
isConstant () |
static Location |
make (java.lang.Object init,
java.lang.String name) |
static IndirectableLocation |
make (java.lang.String name) |
static IndirectableLocation |
make (Symbol name) |
void |
print (java.io.PrintWriter ps) |
abstract void |
set (T value) |
void |
setRestore (java.lang.Object oldValue)
Restore an old value.
|
T |
setValue (T newValue) |
java.lang.Object |
setWithSave (T newValue)
Set a value, but return cookie so old value can be restored.
|
java.lang.String |
toString () |
void |
undefine () |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final java.lang.String UNBOUND
public Location()
public Symbol getKeySymbol()
public java.lang.Object getKeyProperty()
public java.lang.String toString()
toString in class java.lang.Objectpublic abstract T get()
UnboundLocationException - the location does not have a value.public abstract void set(T value)
public void undefine()
public java.lang.Object setWithSave(T newValue)
public void setRestore(java.lang.Object oldValue)
oldValue - the return value from a prior setWithSave.public abstract boolean isBound()
public boolean isConstant()
public Location getBase()
public final T getValue()
public boolean entered()
public void print(java.io.PrintWriter ps)
public static Location make(java.lang.Object init, java.lang.String name)
public static IndirectableLocation make(java.lang.String name)
public static IndirectableLocation make(Symbol name)
public static Location define(Symbol name)