public class PropertyLocation extends Location<java.lang.Object>
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.Constructor and Description |
---|
PropertyLocation() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get()
Get the current value of this location.
|
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 property associated 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.
|
define, entered, get, getBase, getKeyProperty, getKeySymbol, getValue, isConstant, make, make, make, print, setRestore, setValue, setWithSave, toString, undefine
public final java.lang.Object get()
Location
public final void set(java.lang.Object newValue)
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.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
. A String
is converted to a
Symbol
using env.getSymbol()
.
Symbols require a constant-type hash lookup; other object
are searched linearly.public static java.lang.Object getProperty(java.lang.Object symbol, java.lang.Object property, java.lang.Object defaultValue)
get
function.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)