public class ModuleMap extends java.lang.Object implements Renamer.Translation
module
dependencies and nonterminals.| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,ModuleName> |
map
The mapping from module names (represented as strings) to module
names (represented as
module names). |
| Constructor and Description |
|---|
ModuleMap()
Create a new module map.
|
ModuleMap(ModuleList keys,
ModuleList values)
Create a new module map.
|
ModuleMap(ModuleName key,
ModuleName value)
Create a new module map.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(ModuleName key)
Determine whether this module map contains a mapping for the
specified module name.
|
boolean |
containsKey(java.lang.String key)
Determine whether this module map contains a mapping for the
specified module name.
|
ModuleName |
get(ModuleName key)
Look up the specified module name.
|
java.lang.String |
get(java.lang.String key)
Look up the specified module name.
|
NonTerminal |
map(NonTerminal nt,
Analyzer analyzer)
Map the specified nonterminal to its replacement, which may be
the same as the original.
|
void |
put(ModuleName key,
ModuleName value)
Add the specified mapping.
|
protected java.util.Map<java.lang.String,ModuleName> map
module names).public ModuleMap()
public ModuleMap(ModuleName key, ModuleName value)
key - The single initial key.value - The single initial value.public ModuleMap(ModuleList keys, ModuleList values)
keys - The list of keys.values - The list of values.java.lang.IllegalArgumentException - Signals that the lists have different lengths.public void put(ModuleName key, ModuleName value)
key - The key.value - The value.public boolean containsKey(ModuleName key)
key - The module name.true if this module map has a value for the
key.public boolean containsKey(java.lang.String key)
key - The module name.true if this module map has a value for the
key.public ModuleName get(ModuleName key)
key - The module name.null if there is
no mapping for the module name.public java.lang.String get(java.lang.String key)
key - The module name.null if there is
no mapping for the module name.public NonTerminal map(NonTerminal nt, Analyzer analyzer)
Renamer.Translationmap in interface Renamer.Translationnt - The nonterminal.analyzer - The analyzer utility.Copyright © 2014. All Rights Reserved.