Class FieldSizedCapacityMapExtractor
- java.lang.Object
-
- org.eclipse.mat.internal.collectionextract.FieldArrayCollectionExtractor
-
- org.eclipse.mat.internal.collectionextract.FieldSizeArrayCollectionExtractor
-
- org.eclipse.mat.internal.collectionextract.FieldSizedCapacityCollectionExtractor
-
- org.eclipse.mat.internal.collectionextract.FieldSizedCapacityMapExtractor
-
- All Implemented Interfaces:
ICollectionExtractor,IMapExtractor
public class FieldSizedCapacityMapExtractor extends FieldSizedCapacityCollectionExtractor implements IMapExtractor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.mat.inspections.collectionextract.IMapExtractor
IMapExtractor.EntryObject
-
-
Constructor Summary
Constructors Constructor Description FieldSizedCapacityMapExtractor(String sizeField, String arrayField, String capacityField)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator<Map.Entry<IObject,IObject>>extractMapEntries(IObject collection)Extracts the contents of a map (i.e.IntegergetCapacity(IObject coll)Return the capacity of the collection, if applicableDoublegetCollisionRatio(IObject coll)Calculates the collision ratio in the collection.booleanhasCollisionRatio()Check if the extractor can calculate collision ratio-
Methods inherited from class org.eclipse.mat.internal.collectionextract.FieldSizedCapacityCollectionExtractor
extractEntries, extractEntryIds, getArray, getNumberOfNotNullElements, hasCapacity, hasExtractableArray, hasExtractableContents
-
Methods inherited from class org.eclipse.mat.internal.collectionextract.FieldSizeArrayCollectionExtractor
getSize, hasSize
-
Methods inherited from class org.eclipse.mat.internal.collectionextract.FieldArrayCollectionExtractor
getFillRatio, hasFillRatio
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.mat.inspections.collectionextract.ICollectionExtractor
extractEntries, extractEntryIds, getFillRatio, getNumberOfNotNullElements, getSize, hasCapacity, hasExtractableArray, hasExtractableContents, hasFillRatio, hasSize
-
-
-
-
Method Detail
-
getCapacity
public Integer getCapacity(IObject coll) throws SnapshotException
Description copied from interface:ICollectionExtractorReturn the capacity of the collection, if applicable- Specified by:
getCapacityin interfaceICollectionExtractor- Overrides:
getCapacityin classFieldSizedCapacityCollectionExtractor- Parameters:
coll- - the collection to find the capacity of- Returns:
- the capacity in bytes, or null if unavailable
- Throws:
SnapshotException- if there is a problem retrieving data from the snapshot- See Also:
ICollectionExtractor.hasCapacity()
-
hasCollisionRatio
public boolean hasCollisionRatio()
Description copied from interface:IMapExtractorCheck if the extractor can calculate collision ratio- Specified by:
hasCollisionRatioin interfaceIMapExtractor- Returns:
- true if @
IMapExtractor.getCollisionRatio(IObject)could be called - See Also:
IMapExtractor.getCollisionRatio(IObject)
-
getCollisionRatio
public Double getCollisionRatio(IObject coll) throws SnapshotException
Description copied from interface:IMapExtractorCalculates the collision ratio in the collection. Could be an estimate.- Specified by:
getCollisionRatioin interfaceIMapExtractor- Parameters:
coll- - the collection to calculate the collision ratio of- Returns:
- Double number of elements with colliding keys / size
- Throws:
SnapshotException- See Also:
IMapExtractor.hasCollisionRatio()
-
extractMapEntries
public Iterator<Map.Entry<IObject,IObject>> extractMapEntries(IObject collection) throws SnapshotException
Description copied from interface:IMapExtractorExtracts the contents of a map (i.e. an IObject representing a Map) and provides an Iterator over them- Specified by:
extractMapEntriesin interfaceIMapExtractor- Parameters:
collection- - the map to extract contents from- Returns:
- an Iterator over the entries. If the original Map had an Entry object, the content of the iterator would usually be EntryObject
- Throws:
SnapshotException
-
-