org.erights.e.elang.scope
Class PatternMapBase

java.lang.Object
  |
  +--org.erights.e.elang.scope.PatternMap
        |
        +--org.erights.e.elang.scope.PatternMapBase

class PatternMapBase
extends PatternMap

A single-contour PatternMap.

Author:
Ka-Ping Yee

Field Summary
private  FlexMap myPatterns
           
 
Fields inherited from class org.erights.e.elang.scope.PatternMap
EMPTY
 
Constructor Summary
(package private) PatternMapBase(FlexMap patterns)
           
 
Method Summary
(package private)  void addNamesTo(FlexSet names)
           
 void assertShadowable(String name)
          Enabled: Throw an exception if 'name' may not be shadowed because it is already defined in the current (i.e.
 boolean contains(String name)
          Enabled: Is 'name' in scope?
 NounPattern getPattern(String name)
          Enabled: Get the NounPattern that was used to bind a given variable.
 ConstSet namesSet()
          Enabled: Return the set of names bound in this PatternMap.
 void replace(String name, NounPattern pattern)
          Enabled:
 
Methods inherited from class org.erights.e.elang.scope.PatternMap
make, nested, with
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myPatterns

private final FlexMap myPatterns
Constructor Detail

PatternMapBase

PatternMapBase(FlexMap patterns)
Method Detail

getPattern

public NounPattern getPattern(String name)
Description copied from class: PatternMap
Enabled: Get the NounPattern that was used to bind a given variable.

Specified by:
getPattern in class PatternMap

contains

public boolean contains(String name)
Description copied from class: PatternMap
Enabled: Is 'name' in scope?

Specified by:
contains in class PatternMap

namesSet

public ConstSet namesSet()
Description copied from class: PatternMap
Enabled: Return the set of names bound in this PatternMap.

Overrides:
namesSet in class PatternMap

addNamesTo

void addNamesTo(FlexSet names)
Specified by:
addNamesTo in class PatternMap

replace

public void replace(String name,
                    NounPattern pattern)
Description copied from class: PatternMap
Enabled:

Specified by:
replace in class PatternMap

assertShadowable

public void assertShadowable(String name)
Description copied from class: PatternMap
Enabled: Throw an exception if 'name' may not be shadowed because it is already defined in the current (i.e. innermost) layer.

Specified by:
assertShadowable in class PatternMap


comments?