Package gnu.mapping
Class SimpleEnvironment
java.lang.Object
gnu.mapping.PropertySet
gnu.mapping.Environment
gnu.mapping.SimpleEnvironment
- All Implemented Interfaces:
Named
- Direct Known Subclasses:
InheritingEnvironment
Concrete implementation of
Environment
.
(Should consider merging this code with Table2D.)-
Field Summary
Fields inherited from class gnu.mapping.Environment
curEnvironment, INDIRECT_DEFINES
Fields inherited from class gnu.mapping.PropertySet
nameKey
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddLocation
(Symbol name, Object property, Location loc) protected NamedLocation
addUnboundLocation
(Symbol name, Object property, int hash) void
entrySet()
Does enumerate inherited Locations.Does not enumerate inherited Locations.static Location
getCurrentLocation
(String name) getLocation
(Symbol name, Object property, int hash, boolean create) protected boolean
static Object
lookup_global
(Symbol name) lookupDirect
(Symbol name, Object property, int hash) protected NamedLocation
newLocation
(Symbol name, Object property) void
void
protected void
redefineError
(Symbol name, Object property, Location loc) int
size()
Size does not include inherited Locations.protected void
toStringBase
(StringBuffer sbuf) Overridden in sub-classes - useful for more verbose debug output.Remove Location from this Environment.void
Methods inherited from class gnu.mapping.Environment
addLocation, addLocation, containsKey, current, defaultNamespace, get, get, get, get, get, getCanDefine, getCanRedefine, getChecked, getCurrent, getFlags, getFunction, getFunction, getGlobal, getInstance, getLocation, getLocation, getLocation, getLocation, getSymbol, isBound, isBound, isLocked, lookup, lookup, make, make, make, put, put, put, putFunction, remove, remove, remove, remove, remove, removeFunction, restoreCurrent, setCanDefine, setCanRedefine, setCurrent, setFlag, setGlobal, setIndirectDefines, setLocked, setSaveCurrent, toString, user
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
-
Constructor Details
-
SimpleEnvironment
public SimpleEnvironment() -
SimpleEnvironment
-
SimpleEnvironment
public SimpleEnvironment(int capacity)
-
-
Method Details
-
size
public int size()Size does not include inherited Locations. -
getCurrentLocation
-
lookup_global
- Throws:
UnboundLocationException
-
lookup
- Specified by:
lookup
in classEnvironment
-
lookupDirect
-
getLocation
- Specified by:
getLocation
in classEnvironment
-
addUnboundLocation
-
put
- Overrides:
put
in classEnvironment
-
newLocation
-
define
-
define
- Specified by:
define
in classEnvironment
-
redefineError
-
addLocation
- Specified by:
addLocation
in classEnvironment
-
unlink
Description copied from class:Environment
Remove Location from this Environment. Does not explicitly undefine the location itself.- Overrides:
unlink
in classEnvironment
-
enumerateLocations
Does not enumerate inherited Locations.- Specified by:
enumerateLocations
in classEnvironment
-
enumerateAllLocations
Does enumerate inherited Locations.- Specified by:
enumerateAllLocations
in classEnvironment
-
hasMoreElements
- Specified by:
hasMoreElements
in classEnvironment
-
writeExternal
- Throws:
IOException
-
readExternal
- Throws:
IOException
ClassNotFoundException
-
readResolve
- Throws:
ObjectStreamException
-
entrySet
-
toStringVerbose
Description copied from class:Environment
Overridden in sub-classes - useful for more verbose debug output.- Overrides:
toStringVerbose
in classEnvironment
-
toStringBase
-