Package org.eclipse.mat.inspections.collectionextract

## Class IMapExtractor.EntryObject

- java.lang.Object
- - org.eclipse.mat.inspections.collectionextract.IMapExtractor.EntryObject

All Implemented Interfaces:
  `java.io.Serializable`, `java.util.Map.Entry<IObject,​IObject>`, `IObject`

Enclosing interface:
  IMapExtractor

    public static class IMapExtractor.EntryObject
    extends java.lang.Object
    implements java.util.Map.Entry<IObject,​IObject>, IObject

See Also:
  Serialized Form

### Nested Class Summary

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

`IObject.Type`

### Constructor Summary

Constructors
`EntryObject​(IObject self, IObject key, IObject value)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals​(java.lang.Object obj)`
`java.lang.String` `getClassSpecificName()` Get class specific name of this object which depends on the availability of the appropriate name resolver, e.g.
`IClass` `getClazz()` Get class snapshot object this object is an instance of.
`java.lang.String` `getDisplayName()` Get concatenation of `IObject.getTechnicalName()` and `IObject.getClassSpecificName()`.
`GCRootInfo[]` `getGCRootInfo()` Get `GCRootInfo` if the object is a garbage collection root or null otherwise.
`IObject` `getKey()`
`long` `getObjectAddress()` Get address for the snapshot object.
`int` `getObjectId()` Get id for the snapshot object.
`java.util.List<NamedReference>` `getOutboundReferences()` Get list of snapshot objects referenced from this snapshot object with the name of the field over which it was referenced.
`long` `getRetainedHeapSize()` Get retained heap size of this object.
`ISnapshot` `getSnapshot()` Returns the snapshot from which this object has been read.
`java.lang.String` `getTechnicalName()` Get technical name of this object which is something like class@address.
`long` `getUsedHeapSize()` Get used heap size of just this object.
`IObject` `getValue()`
`int` `hashCode()`
`java.lang.Object` `resolveValue​(java.lang.String field)` Resolves and returns the value of a field specified by a dot notation.
`IObject` `setValue​(IObject value)`
`java.lang.String` `toString()`

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

`getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### EntryObject

    public EntryObject​(IObject self,
                       IObject key,
                       IObject value)

### Method Detail

#### getKey

    public IObject getKey()

Specified by:
  `getKey` in interface `java.util.Map.Entry<IObject,​IObject>`

#### getValue

    public IObject getValue()

Specified by:
  `getValue` in interface `java.util.Map.Entry<IObject,​IObject>`

#### getObjectId

    public int getObjectId()

Description copied from interface: `IObject`
Get id for the snapshot object. The id is not the address, but an internally assigned number fitting into an `int` (this helps reducing the memory footprint of the snapshot considerably - addresses are only used for visualization purposes).

Specified by:
  `getObjectId` in interface `IObject`
Returns:
  id for the snapshot object

#### getObjectAddress

    public long getObjectAddress()

Description copied from interface: `IObject`
Get address for the snapshot object. This is the address at which the object was stored in memory. Use the address only for visualization purposes and try to use the id wherever possible as the snapshot API is optimized to handle ids and not addresses. Addresses are bigger ( `long`), have no consecutive order (with gaps), and are not used for hashing.

Specified by:
  `getObjectAddress` in interface `IObject`
Returns:
  address for the snapshot object

#### getClazz

    public IClass getClazz()

Description copied from interface: `IObject`
Get class snapshot object this object is an instance of.

Specified by:
  `getClazz` in interface `IObject`
Returns:
  class snapshot object this object is an instance of

#### getUsedHeapSize

    public long getUsedHeapSize()

Description copied from interface: `IObject`
Get used heap size of just this object.

Specified by:
  `getUsedHeapSize` in interface `IObject`
Returns:
  used heap size of this object

#### getRetainedHeapSize

    public long getRetainedHeapSize()

Description copied from interface: `IObject`
Get retained heap size of this object.

Specified by:
  `getRetainedHeapSize` in interface `IObject`
Returns:
  retained heap size of this object (returns 0 if the dominator tree wasn't calculated for the corresponding snapshot)

#### getTechnicalName

    public java.lang.String getTechnicalName()

Description copied from interface: `IObject`
Get technical name of this object which is something like class@address.

Specified by:
  `getTechnicalName` in interface `IObject`
Returns:
  technical name of this object which is something like class@address

#### getClassSpecificName

    public java.lang.String getClassSpecificName()

Description copied from interface: `IObject`
Get class specific name of this object which depends on the availability of the appropriate name resolver, e.g. for a String the value of the char[].

Specified by:
  `getClassSpecificName` in interface `IObject`
Returns:
  class specific name of the given snapshot object or null if it can't be resolved

#### getDisplayName

    public java.lang.String getDisplayName()

Description copied from interface: `IObject`
Get concatenation of `IObject.getTechnicalName()` and `IObject.getClassSpecificName()`.

Specified by:
  `getDisplayName` in interface `IObject`
Returns:
  concatenation of `IObject.getTechnicalName()` and `IObject.getClassSpecificName()`

#### getOutboundReferences

    public java.util.List<NamedReference> getOutboundReferences()

Description copied from interface: `IObject`
Get list of snapshot objects referenced from this snapshot object with the name of the field over which it was referenced.

Specified by:
  `getOutboundReferences` in interface `IObject`
Returns:
  list of snapshot objects referenced from this snapshot object with the name of the field over which it was referenced

#### resolveValue

    public java.lang.Object resolveValue​(java.lang.String field)
                                  throws SnapshotException

Description copied from interface: `IObject`
Resolves and returns the value of a field specified by a dot notation. If the field is a primitive type, the value the returns the corresponding object wrapper, e.g. a java.lang.Boolean is returned for a field of type boolean. If the field is an object reference, the corresponding IObject is returned.

The field can be specified using the dot notation, i.e. object references are followed and its fields are evaluated. If any of the object references is null, null is returned.

Specified by:
  `resolveValue` in interface `IObject`
Parameters:
  `field` - the field name in dot notation
Returns:
  the value of the field
Throws:
  `SnapshotException` - when there is a problem retrieving the field

#### getGCRootInfo

    public GCRootInfo[] getGCRootInfo()
                               throws SnapshotException

Description copied from interface: `IObject`
Get `GCRootInfo` if the object is a garbage collection root or null otherwise. An object may or may not be a garbage collection root, it may even be one for multiple reasons (described in the `GCRootInfo` object).

Specified by:
  `getGCRootInfo` in interface `IObject`
Returns:
  `GCRootInfo` if the object is a garbage collection root or null otherwise
Throws:
  `SnapshotException` - when there is a problem retrieving the information

#### getSnapshot

    public ISnapshot getSnapshot()

Description copied from interface: `IObject`
Returns the snapshot from which this object has been read.

Specified by:
  `getSnapshot` in interface `IObject`
Returns:
  the snapshot from which this object has been read.

#### setValue

    public IObject setValue​(IObject value)

Specified by:
  `setValue` in interface `java.util.Map.Entry<IObject,​IObject>`

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### hashCode

    public int hashCode()

Specified by:
  `hashCode` in interface `java.util.Map.Entry<IObject,​IObject>`
Overrides:
  `hashCode` in class `java.lang.Object`

#### equals

    public boolean equals​(java.lang.Object obj)

Specified by:
  `equals` in interface `java.util.Map.Entry<IObject,​IObject>`
Overrides:
  `equals` in class `java.lang.Object`