org.eclipse.mat.inspections.collectionextract
Class ExtractedMap

java.lang.Object
  extended by org.eclipse.mat.inspections.collectionextract.AbstractExtractedCollection<Map.Entry<IObject,IObject>,IMapExtractor>
      extended by org.eclipse.mat.inspections.collectionextract.ExtractedMap
All Implemented Interfaces:
Serializable, Iterable<Map.Entry<IObject,IObject>>, IObject

public class ExtractedMap
extends AbstractExtractedCollection<Map.Entry<IObject,IObject>,IMapExtractor>

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:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.mat.snapshot.model.IObject
IObject.Type
 
Constructor Summary
ExtractedMap(IObject coll, IMapExtractor extractor)
           
 
Method Summary
 IObject getByKeyIdentity(IObject key)
          Gets an object from the Map, searching by the key.
 Double getCollisionRatio()
          Get the ration of collisions inside the map
 boolean hasCollisionRatio()
          Check if collision ratio can be calculated for the map
 Iterator<Map.Entry<IObject,IObject>> iterator()
           
 
Methods inherited from class org.eclipse.mat.inspections.collectionextract.AbstractExtractedCollection
extractEntries, extractEntryIds, getCapacity, getClassSpecificName, getClazz, getDisplayName, getFillRatio, getGCRootInfo, getObjectAddress, getObjectId, getOutboundReferences, getRetainedHeapSize, getSnapshot, getTechnicalName, getUsedHeapSize, hasCapacity, hasExtractableArray, hasExtractableContents, hasFillRatio, hasSize, isEmpty, resolveValue, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtractedMap

public ExtractedMap(IObject coll,
                    IMapExtractor extractor)
Method Detail

hasCollisionRatio

public boolean hasCollisionRatio()
Check if collision ratio can be calculated for the map

Returns:

getCollisionRatio

public Double getCollisionRatio()
                         throws SnapshotException
Get the ration of collisions inside the map

Returns:
Throws:
SnapshotException

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:
Throws:
SnapshotException

iterator

public Iterator<Map.Entry<IObject,IObject>> iterator()