|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gnu.mapping.Location gnu.mapping.PropertyLocation
public class PropertyLocation
Used to implement Lisp-style "property lists".
A PropertyLocation
is a location whose value is the
car
of a property list.
This class also contaisn a number of static methods useful for
working with property lists.
Field Summary |
---|
Fields inherited from class gnu.mapping.Location |
---|
UNBOUND |
Constructor Summary | |
---|---|
PropertyLocation()
|
Method Summary | |
---|---|
java.lang.Object |
get(java.lang.Object defaultValue)
|
static java.lang.Object |
getProperty(java.lang.Object symbol,
java.lang.Object property,
java.lang.Object defaultValue)
Gets a property value associated with an object. |
static java.lang.Object |
getProperty(java.lang.Object symbol,
java.lang.Object property,
java.lang.Object defaultValue,
Environment env)
Gets a property value associated with an object. |
static java.lang.Object |
getPropertyList(java.lang.Object symbol)
Get the property list associated with object in the current Environment. |
static java.lang.Object |
getPropertyList(java.lang.Object symbol,
Environment env)
Get the property list assocated with an object in a given Environment. |
boolean |
isBound()
|
static java.lang.Object |
plistGet(java.lang.Object plist,
java.lang.Object prop,
java.lang.Object dfault)
Given a property list and a key, find the corresponding property value. |
static java.lang.Object |
plistPut(java.lang.Object plist,
java.lang.Object prop,
java.lang.Object value)
Modify and add a property binding to a property list. |
static java.lang.Object |
plistRemove(java.lang.Object plist,
java.lang.Object prop)
Remove a property binding from a property list. |
static void |
putProperty(java.lang.Object symbol,
java.lang.Object property,
java.lang.Object newValue)
Sets a property value associated with an object. |
static void |
putProperty(java.lang.Object symbol,
java.lang.Object property,
java.lang.Object newValue,
Environment env)
|
static boolean |
removeProperty(java.lang.Object symbol,
java.lang.Object property)
Remove a properaty assocatied with an object. |
static boolean |
removeProperty(java.lang.Object symbol,
java.lang.Object property,
Environment env)
Remove a properaty assocatied with an object. |
void |
set(java.lang.Object newValue)
|
static void |
setPropertyList(java.lang.Object symbol,
java.lang.Object plist)
Set the property list assocated with an object in a given Environment. |
static void |
setPropertyList(java.lang.Object symbol,
java.lang.Object plist,
Environment env)
Set the property list assocated with an object in a given Environment. |
Methods inherited from class gnu.mapping.Location |
---|
entered, get, getBase, getKeyProperty, getKeySymbol, getValue, isConstant, make, make, make, print, setRestore, setValue, setWithSave, toString, undefine |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PropertyLocation()
Method Detail |
---|
public final java.lang.Object get(java.lang.Object defaultValue)
get
in class Location
public boolean isBound()
isBound
in class Location
public final void set(java.lang.Object newValue)
set
in class Location
public static java.lang.Object getPropertyList(java.lang.Object symbol, Environment env)
symbol
- Usually but not necessarily a Symbol.
(A String is not converted a Symbol by this method.)public static java.lang.Object getPropertyList(java.lang.Object symbol)
symbol-plist
function.
symbol
- Usually but not necessarily a Symbol.
(A String is not converted a Symbol by this method.)public static void setPropertyList(java.lang.Object symbol, java.lang.Object plist, Environment env)
symbol
- Usually but not necessarily a Symbol.
(A String is not converted a Symbol by this method.)public static void setPropertyList(java.lang.Object symbol, java.lang.Object plist)
(setf symbol-plist)
function.
setPropertyList(Object, Object, Environment).
public static java.lang.Object getProperty(java.lang.Object symbol, java.lang.Object property, java.lang.Object defaultValue, Environment env)
symbol
- Usually a Symbol
, but can be any
Object>/code>. A String
is converted to a
Symbol
using env.getSymbol()
.
Symbols require a constant-type hash lookup; other object
are serached linearly.
public static java.lang.Object getProperty(java.lang.Object symbol, java.lang.Object property, java.lang.Object defaultValue)
get
function.
getProperty(Object, Object, Object, Environment).
public static void putProperty(java.lang.Object symbol, java.lang.Object property, java.lang.Object newValue, Environment env)
public static void putProperty(java.lang.Object symbol, java.lang.Object property, java.lang.Object newValue)
(setf get)
function.
public static boolean removeProperty(java.lang.Object symbol, java.lang.Object property, Environment env)
public static boolean removeProperty(java.lang.Object symbol, java.lang.Object property)
remprop
function.
public static java.lang.Object plistGet(java.lang.Object plist, java.lang.Object prop, java.lang.Object dfault)
public static java.lang.Object plistPut(java.lang.Object plist, java.lang.Object prop, java.lang.Object value)
public static java.lang.Object plistRemove(java.lang.Object plist, java.lang.Object prop)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |