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_DEFINESFields inherited from class gnu.mapping.PropertySet
nameKey -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddLocation(Symbol name, Object property, Location loc) protected NamedLocationaddUnboundLocation(Symbol name, Object property, int hash) voidentrySet()Does enumerate inherited Locations.Does not enumerate inherited Locations.static LocationgetCurrentLocation(String name) getLocation(Symbol name, Object property, int hash, boolean create) protected booleanstatic Objectlookup_global(Symbol name) lookupDirect(Symbol name, Object property, int hash) protected NamedLocationnewLocation(Symbol name, Object property) voidvoidprotected voidredefineError(Symbol name, Object property, Location loc) intsize()Size does not include inherited Locations.protected voidtoStringBase(StringBuffer sbuf) Overridden in sub-classes - useful for more verbose debug output.Remove Location from this Environment.voidMethods 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, userMethods 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:
lookupin classEnvironment
-
lookupDirect
-
getLocation
- Specified by:
getLocationin classEnvironment
-
addUnboundLocation
-
put
- Overrides:
putin classEnvironment
-
newLocation
-
define
-
define
- Specified by:
definein classEnvironment
-
redefineError
-
addLocation
- Specified by:
addLocationin classEnvironment
-
unlink
Description copied from class:EnvironmentRemove Location from this Environment. Does not explicitly undefine the location itself.- Overrides:
unlinkin classEnvironment
-
enumerateLocations
Does not enumerate inherited Locations.- Specified by:
enumerateLocationsin classEnvironment
-
enumerateAllLocations
Does enumerate inherited Locations.- Specified by:
enumerateAllLocationsin classEnvironment
-
hasMoreElements
- Specified by:
hasMoreElementsin classEnvironment
-
writeExternal
- Throws:
IOException
-
readExternal
- Throws:
IOExceptionClassNotFoundException
-
readResolve
- Throws:
ObjectStreamException
-
entrySet
-
toStringVerbose
Description copied from class:EnvironmentOverridden in sub-classes - useful for more verbose debug output.- Overrides:
toStringVerbosein classEnvironment
-
toStringBase
-