Class MapCollectionExtractorBase
- java.lang.Object
-
- org.eclipse.mat.internal.collectionextract.MapCollectionExtractorBase
-
- All Implemented Interfaces:
ICollectionExtractor
,IMapExtractor
- Direct Known Subclasses:
HashedMapCollectionExtractorBase
,TreeMapCollectionExtractor
public abstract class MapCollectionExtractorBase extends java.lang.Object implements IMapExtractor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.mat.inspections.collectionextract.IMapExtractor
IMapExtractor.EntryObject
-
-
Constructor Summary
Constructors Constructor Description MapCollectionExtractorBase(java.lang.String keyField, java.lang.String valueField)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Iterator<java.util.Map.Entry<IObject,IObject>>
extractMapEntries(IObject coll)
Extracts the contents of a map (i.e.java.lang.Integer
getCapacity(IObject coll)
Return the capacity of the collection, if applicableboolean
hasCapacity()
Check if the collection has capacity, e.g.-
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, hasExtractableArray, hasExtractableContents, hasFillRatio, hasSize
-
Methods inherited from interface org.eclipse.mat.inspections.collectionextract.IMapExtractor
getCollisionRatio, hasCollisionRatio
-
-
-
-
Method Detail
-
hasCapacity
public boolean hasCapacity()
Description copied from interface:ICollectionExtractor
Check if the collection has capacity, e.g. ArrayList- Specified by:
hasCapacity
in interfaceICollectionExtractor
- Returns:
- true if
ICollectionExtractor.getCapacity(IObject)
could be called - See Also:
ICollectionExtractor.getCapacity(IObject)
-
getCapacity
public java.lang.Integer getCapacity(IObject coll) throws SnapshotException
Description copied from interface:ICollectionExtractor
Return the capacity of the collection, if applicable- Specified by:
getCapacity
in interfaceICollectionExtractor
- 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()
-
extractMapEntries
public java.util.Iterator<java.util.Map.Entry<IObject,IObject>> extractMapEntries(IObject coll)
Description copied from interface:IMapExtractor
Extracts the contents of a map (i.e. an IObject representing a Map) and provides an Iterator over them- Specified by:
extractMapEntries
in interfaceIMapExtractor
- Parameters:
coll
- - 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
-
-