gnu.mapping
public class PropertyLocation extends Location
PropertyLocation
is a location whose value is the
car
of a property list.
This class also contains a number of static methods useful for
working with property lists.
Method Summary | |
---|---|
Object | get(Object defaultValue) |
static Object | getProperty(Object symbol, Object property, Object defaultValue, Environment env) Gets a property value associated with an object. |
static Object | getProperty(Object symbol, Object property, Object defaultValue) Gets a property value associated with an object.
|
static Object | getPropertyList(Object symbol, Environment env) Get the property list assocated with an object in a given Environment. |
static Object | getPropertyList(Object symbol) Get the property list associated with object in the current Environment.
|
boolean | isBound() |
static Object | plistGet(Object plist, Object prop, Object dfault)
Given a property list and a key, find the corresponding property value. |
static Object | plistPut(Object plist, Object prop, Object value) Modify and add a property binding to a property list. |
static Object | plistRemove(Object plist, Object prop) Remove a property binding from a property list. |
static void | putProperty(Object symbol, Object property, Object newValue, Environment env) |
static void | putProperty(Object symbol, Object property, Object newValue) Sets a property value associated with an object.
|
static boolean | removeProperty(Object symbol, Object property, Environment env) Remove a properaty assocatied with an object. |
static boolean | removeProperty(Object symbol, Object property) Remove a properaty assocatied with an object.
|
void | set(Object newValue) |
static void | setPropertyList(Object symbol, Object plist, Environment env) Set the property list assocated with an object in a given Environment.
|
static void | setPropertyList(Object symbol, Object plist) Set the property list assocated with an object in a given Environment.
|
Parameters: 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.
get
function.See Also: .
Parameters: symbol Usually but not necessarily a Symbol. (A String is not converted a Symbol by this method.)
symbol-plist
function.Parameters: symbol Usually but not necessarily a Symbol. (A String is not converted a Symbol by this method.)
Returns: The updated property list.
Returns: The updated property list.
(setf get)
function.remprop
function.Parameters: symbol Usually but not necessarily a Symbol. (A String is not converted a Symbol by this method.)
(setf symbol-plist)
function.See Also: .