org.eclipse.mat.internal.collectionextract

## Class HashedMapCollectionExtractorBase

- java.lang.Object
- - org.eclipse.mat.internal.collectionextract.MapCollectionExtractorBase
  - - org.eclipse.mat.internal.collectionextract.HashedMapCollectionExtractorBase

All Implemented Interfaces:
  ICollectionExtractor, IMapExtractor

Direct Known Subclasses:
  ConcurrentHashMapCollectionExtractor, ConcurrentSkipListCollectionExtractor, HashMapCollectionExtractor

    public abstract class HashedMapCollectionExtractorBase
    extends MapCollectionExtractorBase

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.eclipse.mat.inspections.collectionextract.IMapExtractor

`IMapExtractor.EntryObject`

### Constructor Summary

Constructors
Constructor and Description
`HashedMapCollectionExtractorBase(String arrayField, String keyField, String valueField)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Double` `getCollisionRatio(IObject coll)` Calculates the collision ratio in the collection
`Double` `getFillRatio(IObject coll)` Calculate the fill ration of a collection
`boolean` `hasCollisionRatio()` Check if the extractor can calculate collision ratio
`boolean` `hasFillRatio()` Check if fill ratio for the collection can be calculated, i.e.

### Methods inherited from class org.eclipse.mat.internal.collectionextract.MapCollectionExtractorBase

`extractMapEntries, getCapacity, hasCapacity`

### 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, getNumberOfNotNullElements, getSize, hasExtractableArray, hasExtractableContents, hasSize`

### Constructor Detail

#### HashedMapCollectionExtractorBase

    public HashedMapCollectionExtractorBase(String arrayField,
                                            String keyField,
                                            String valueField)

### Method Detail

#### 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`

#### hasCollisionRatio

    public boolean hasCollisionRatio()

Description copied from interface: `IMapExtractor`
Check if the extractor can calculate collision ratio

Returns:

#### getCollisionRatio

    public Double getCollisionRatio(IObject coll)
                             throws SnapshotException

Description copied from interface: `IMapExtractor`
Calculates the collision ratio in the collection

Returns:
  Double number of elements with colliding keys / size
Throws:
  `SnapshotException`