org.eclipse.mat.internal.collectionextract
Class TreeMapCollectionExtractor

java.lang.Object
  extended by org.eclipse.mat.internal.collectionextract.MapCollectionExtractorBase
      extended by org.eclipse.mat.internal.collectionextract.TreeMapCollectionExtractor
All Implemented Interfaces:
ICollectionExtractor, IMapExtractor

public class TreeMapCollectionExtractor
extends MapCollectionExtractorBase


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.mat.inspections.collectionextract.IMapExtractor
IMapExtractor.EntryObject
 
Constructor Summary
TreeMapCollectionExtractor(String sizeField, String keyField, String valueField)
           
 
Method Summary
 IObjectArray extractEntries(IObject coll)
          Extracts the array containing the collection content
 int[] extractEntryIds(IObject treeMap)
          Returns the object ids (int) for all objects which are contained in the collection
 Double getCollisionRatio(IObject collection)
          Calculates the collision ratio in the collection
 Double getFillRatio(IObject coll)
          Calculate the fill ration of a collection
 Integer getNumberOfNotNullElements(IObject coll)
          Returns the number of non-null elements in the collection.
 boolean hasCollisionRatio()
          Check if the extractor can calculate collision ratio
 boolean hasExtractableArray()
          Return true if the collection array based and the array can be extracted from the heap dump
 boolean hasExtractableContents()
          Check if the collection has extractable contents
 boolean hasFillRatio()
          Check if fill ratio for the collection can be calculated, i.e.
 boolean hasSize()
          Check if the size of the collection can be extracted
 
Methods inherited from class org.eclipse.mat.internal.collectionextract.MapCollectionExtractorBase
extractMapEntries, getCapacity, getSize, hasCapacity
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeMapCollectionExtractor

public TreeMapCollectionExtractor(String sizeField,
                                  String keyField,
                                  String valueField)
Method Detail

hasExtractableArray

public boolean hasExtractableArray()
Description copied from interface: ICollectionExtractor
Return true if the collection array based and the array can be extracted from the heap dump

Returns:

extractEntries

public IObjectArray extractEntries(IObject coll)
                            throws SnapshotException
Description copied from interface: ICollectionExtractor
Extracts the array containing the collection content

Returns:
Throws:
SnapshotException

hasExtractableContents

public boolean hasExtractableContents()
Description copied from interface: ICollectionExtractor
Check if the collection has extractable contents

Returns:

extractEntryIds

public int[] extractEntryIds(IObject treeMap)
                      throws SnapshotException
Description copied from interface: ICollectionExtractor
Returns the object ids (int) for all objects which are contained in the collection

Returns:
Throws:
SnapshotException

hasSize

public boolean hasSize()
Description copied from interface: ICollectionExtractor
Check if the size of the collection can be extracted

Returns:

getNumberOfNotNullElements

public Integer getNumberOfNotNullElements(IObject coll)
                                   throws SnapshotException
Description copied from interface: ICollectionExtractor
Returns the number of non-null elements in the collection. Requires hasExtractableContents or hasExtractableArray

Returns:
Throws:
SnapshotException

hasCollisionRatio

public boolean hasCollisionRatio()
Description copied from interface: IMapExtractor
Check if the extractor can calculate collision ratio

Returns:

getCollisionRatio

public Double getCollisionRatio(IObject collection)
Description copied from interface: IMapExtractor
Calculates the collision ratio in the collection

Returns:
Double number of elements with colliding keys / size

hasFillRatio

public boolean hasFillRatio()
Description copied from interface: ICollectionExtractor
Check if fill ratio for the collection can be calculated, i.e. if it has some predefined capacity and actual size

Returns:

getFillRatio

public Double getFillRatio(IObject coll)
                    throws SnapshotException
Description copied from interface: ICollectionExtractor
Calculate the fill ration of a collection

Returns:
Throws:
SnapshotException