Class ObjectReferenceMap
java.lang.Object
simula.compiler.utilities.ObjectReferenceMap
This ObjectReferenceMap is used to support the Attribute input stream.
Efforts are made to ensure that only one copy of each object read, is created.
Link to GitHub: Source File.
- Author:
- Øystein Myhre Andersen
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) Map
<Integer, SyntaxClass> The underlying ObjectReference Map -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a ObjectReferenceMap with an underlying HashMap. -
Method Summary
Modifier and TypeMethodDescriptionget
(int key) Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.void
print()
Utility method: printvoid
put
(Integer key, SyntaxClass value) Associates the specified value with the specified key in this map using the underlying HashMap.
-
Field Details
-
objectReference
Map<Integer, SyntaxClass> objectReferenceThe underlying ObjectReference Map
-
-
Constructor Details
-
ObjectReferenceMap
public ObjectReferenceMap()Construct a ObjectReferenceMap with an underlying HashMap.
-
-
Method Details
-
put
Associates the specified value with the specified key in this map using the underlying HashMap.- Parameters:
key
- with which the specified value is to be associatedvalue
- to be associated with the specified key
-
get
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.- Parameters:
key
- the key whose associated value is to be returned- Returns:
- the value to which the specified key is mapped, or null if this map contains no mapping for the key
-
print
public void print()Utility method: print
-