Class ExtractedMap

All Implemented Interfaces:
Serializable, Iterable<Map.Entry<IObject,IObject>>, IObject

An abstract class representing a map extracted from the heap. It provides convenience methods for querying certain properties of the collection (e.g. size) and for extracting the elements of the collection
Since:
1.5
See Also:
  • Constructor Details

  • Method Details

    • hasCollisionRatio

      public boolean hasCollisionRatio()
      Check if collision ratio can be calculated for the map.
      Returns:
      true if @getCollisionRatio() could be called
      See Also:
    • getCollisionRatio

      public Double getCollisionRatio() throws SnapshotException
      Get the ratio of collisions inside the map.
      Returns:
      the collision ratio as a Double between 0.0 and 1.0 inclusive, or possibly null
      Throws:
      SnapshotException - if there is a problem retrieving data from the snapshot
      See Also:
    • getByKeyIdentity

      public IObject getByKeyIdentity(IObject key) throws SnapshotException
      Gets an object from the Map, searching by the key. The keys are matched by IDENTITY, so cannot be used to compare for example Strings
      Parameters:
      key -
      Returns:
      the value object, assuming a match by key identity
      Throws:
      SnapshotException - if there is a problem retrieving data from the snapshot
    • iterator

      public Iterator<Map.Entry<IObject,IObject>> iterator()
      The entries of the map.