Class ObjectReferenceMap

java.lang.Object
simula.compiler.utilities.ObjectReferenceMap

public class ObjectReferenceMap extends Object

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 Details

  • Constructor Details

    • ObjectReferenceMap

      public ObjectReferenceMap()
      Construct a ObjectReferenceMap with an underlying HashMap.
  • Method Details

    • put

      public void put(Integer key, SyntaxClass value)
      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 associated
      value - to be associated with the specified key
    • get

      public SyntaxClass get(int key)
      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