org.eclipse.mat.inspections.collectionextract

## Class ExtractedCollection

- java.lang.Object
- - org.eclipse.mat.inspections.collectionextract.AbstractExtractedCollection<IObject,ICollectionExtractor>
  - - org.eclipse.mat.inspections.collectionextract.ExtractedCollection

All Implemented Interfaces:
  Serializable, Iterable<IObject>, IObject

    public class ExtractedCollection
    extends AbstractExtractedCollection<IObject,ICollectionExtractor>

An class representing a collection extracted from the heap. It provides convenience methods for querying certain properties of the collection (e.g. size) and for extracting the elements of the collection

Since:
  1.5
See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.eclipse.mat.snapshot.model.IObject

`IObject.Type`

### Constructor Summary

Constructors
Constructor and Description
`ExtractedCollection(IObject coll, ICollectionExtractor extractor)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Integer` `getNumberOfNotNullElements()` Get the number of non-null elements contained in the collection
`Iterator<IObject>` `iterator()`

### Methods inherited from class org.eclipse.mat.inspections.collectionextract.AbstractExtractedCollection

`extractEntries, extractEntryIds, getCapacity, getClassSpecificName, getClazz, getDisplayName, getFillRatio, getGCRootInfo, getObjectAddress, getObjectId, getOutboundReferences, getRetainedHeapSize, getSnapshot, getTechnicalName, getUsedHeapSize, hasCapacity, hasExtractableArray, hasExtractableContents, hasFillRatio, hasSize, isEmpty, resolveValue, size, toString`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Constructor Detail

#### ExtractedCollection

    public ExtractedCollection(IObject coll,
                               ICollectionExtractor extractor)

### Method Detail

#### iterator

    public Iterator<IObject> iterator()

#### getNumberOfNotNullElements

    public Integer getNumberOfNotNullElements()
                                       throws SnapshotException

Get the number of non-null elements contained in the collection

Returns:
Throws:
  `SnapshotException`