| java.lang.Object gnu.mapping.Location gnu.mapping.PropertyLocation
PropertyLocation | public class PropertyLocation extends Location (Code) | | Used to implement Lisp-style "property lists".
A 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 | |
final public Object | get(Object defaultValue) | public static Object | getProperty(Object symbol, Object property, Object defaultValue, Environment env) Gets a property value associated with an object.
Parameters: symbol - Usually a Symbol , but can be anyObject>/code>. | public static Object | getProperty(Object symbol, Object property, Object defaultValue) Gets a property value associated with an object. | public static Object | getPropertyList(Object symbol, Environment env) Get the property list assocated with an object in a given Environment. | public static Object | getPropertyList(Object symbol) Get the property list associated with object in the current Environment. | public boolean | isBound() | public static Object | plistGet(Object plist, Object prop, Object dfault) Given a property list and a key, find the corresponding property value. | public static Object | plistPut(Object plist, Object prop, Object value) Modify and add a property binding to a property list. | public static Object | plistRemove(Object plist, Object prop) Remove a property binding from a property list. | public static void | putProperty(Object symbol, Object property, Object newValue, Environment env) | public static void | putProperty(Object symbol, Object property, Object newValue) Sets a property value associated with an object. | public static boolean | removeProperty(Object symbol, Object property, Environment env) Remove a properaty assocatied with an object. | public static boolean | removeProperty(Object symbol, Object property) Remove a properaty assocatied with an object. | final public void | set(Object newValue) | public static void | setPropertyList(Object symbol, Object plist, Environment env) Set the property list assocated with an object in a given Environment.
This function should be avoided, since a Symbol's property list may
be used by unknown classes. | public static void | setPropertyList(Object symbol, Object plist) Set the property list assocated with an object in a given Environment. |
getProperty | public static Object getProperty(Object symbol, Object property, Object defaultValue, Environment env)(Code) | | Gets a property value associated with an object.
Parameters: symbol - Usually a Symbol , but can be anyObject>/code>. A String is converted to aSymbol using env.getSymbol() .Symbols require a constant-type hash lookup; other objectare serached linearly. |
getProperty | public static Object getProperty(Object symbol, Object property, Object defaultValue)(Code) | | Gets a property value associated with an object.
Corresponds to Common Lisp's get function.
See Also: #getProperty(Object, Object, Object, Environment). |
getPropertyList | public static Object getPropertyList(Object symbol, Environment env)(Code) | | Get the property list assocated with an object in a given Environment.
Parameters: symbol - Usually but not necessarily a Symbol.(A String is not converted a Symbol by this method.) |
getPropertyList | public static Object getPropertyList(Object symbol)(Code) | | Get the property list associated with object in the current Environment.
Corresponds to Common Lisp's symbol-plist function.
Parameters: symbol - Usually but not necessarily a Symbol.(A String is not converted a Symbol by this method.) |
isBound | public boolean isBound()(Code) | | |
plistGet | public static Object plistGet(Object plist, Object prop, Object dfault)(Code) | | Given a property list and a key, find the corresponding property value.
|
plistPut | public static Object plistPut(Object plist, Object prop, Object value)(Code) | | Modify and add a property binding to a property list.
The updated property list. |
plistRemove | public static Object plistRemove(Object plist, Object prop)(Code) | | Remove a property binding from a property list.
The updated property list. |
putProperty | public static void putProperty(Object symbol, Object property, Object newValue)(Code) | | Sets a property value associated with an object.
Corresponds to Common Lisp's (setf get) function.
|
removeProperty | public static boolean removeProperty(Object symbol, Object property, Environment env)(Code) | | Remove a properaty assocatied with an object.
|
removeProperty | public static boolean removeProperty(Object symbol, Object property)(Code) | | Remove a properaty assocatied with an object.
Corresponds to Common Lisp's remprop function.
|
setPropertyList | public static void setPropertyList(Object symbol, Object plist, Environment env)(Code) | | Set the property list assocated with an object in a given Environment.
This function should be avoided, since a Symbol's property list may
be used by unknown classes. It also can be slow.
Parameters: symbol - Usually but not necessarily a Symbol.(A String is not converted a Symbol by this method.) |
setPropertyList | public static void setPropertyList(Object symbol, Object plist)(Code) | | Set the property list assocated with an object in a given Environment.
Corresponds to Common Lisp's (setf symbol-plist) function.
See Also: #setPropertyList(Object, Object, Environment). |
|
|