org.eclipse.mat.internal.collectionextract
Class MapCollectionExtractorBase

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

public abstract class MapCollectionExtractorBase
extends Object
implements IMapExtractor


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.mat.inspections.collectionextract.IMapExtractor
IMapExtractor.EntryObject
 
Constructor Summary
MapCollectionExtractorBase(String sizeField, String keyField, String valueField)
           
 
Method Summary
 Iterator<Map.Entry<IObject,IObject>> extractMapEntries(IObject coll)
          Extracts the contents of a map (i.e.
 Integer getCapacity(IObject coll)
          Return the capacity of the collection, if applicable
 Integer getSize(IObject coll)
          Extract the size of the collection
 boolean 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.IMapExtractor
getCollisionRatio, hasCollisionRatio
 
Methods inherited from interface org.eclipse.mat.inspections.collectionextract.ICollectionExtractor
extractEntries, extractEntryIds, getFillRatio, getNumberOfNotNullElements, hasExtractableArray, hasExtractableContents, hasFillRatio, hasSize
 

Constructor Detail

MapCollectionExtractorBase

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

getSize

public Integer getSize(IObject coll)
                throws SnapshotException
Description copied from interface: ICollectionExtractor
Extract the size of the collection

Specified by:
getSize in interface ICollectionExtractor
Returns:
Throws:
SnapshotException

hasCapacity

public boolean hasCapacity()
Description copied from interface: ICollectionExtractor
Check if the collection has capacity, e.g. ArrayList

Specified by:
hasCapacity in interface ICollectionExtractor
Returns:

getCapacity

public Integer getCapacity(IObject coll)
                    throws SnapshotException
Description copied from interface: ICollectionExtractor
Return the capacity of the collection, if applicable

Specified by:
getCapacity in interface ICollectionExtractor
Returns:
Throws:
SnapshotException

extractMapEntries

public Iterator<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 interface IMapExtractor
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