Package org.eclipse.mat.snapshot

# Class DominatorsSummary

java.lang.Object
org.eclipse.mat.snapshot.DominatorsSummary

public final class DominatorsSummary extends Object
This class holds the data of a dominators summary (see ISnapshot.getDominatorsOf()). For a given list of objects the summary contains the dominators of the single objects grouped by class or by class loader.#

No Instantiate:

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`DominatorsSummary.ClassDominatorRecord`
A record containing information for objects of one class dominating a set of other objects
`static class`
`DominatorsSummary.ClassloaderDominatorRecord`
A record containing information for objects loaded by one class loader dominating a set of other objects

## Field Summary

Fields
Modifier and Type
Field
Description
`static final Comparator<Object>`
`COMPARE_BY_DOMINATED`
A comparator by number of dominated objects
`static final Comparator<Object>`
`COMPARE_BY_DOMINATED_HEAP_SIZE`
A comparator by dominated heap size
`static final Comparator<Object>`
`COMPARE_BY_DOMINATED_RETAINED_HEAP_SIZE`
A comparator by dominated objects' retained size
`static final Comparator<Object>`
`COMPARE_BY_DOMINATOR_HEAP_SIZE`
A comparator by dominators heap size
`static final Comparator<Object>`
`COMPARE_BY_DOMINATOR_RETAINED_HEAP_SIZE`
A comparator by dominators' retained size
`static final Comparator<Object>`
`COMPARE_BY_DOMINATORS`
A comparator by number of dominators
`static final Comparator<Object>`
`COMPARE_BY_NAME`
A comparator by name

## Constructor Summary

Constructors
Constructor
Description
`DominatorsSummary(DominatorsSummary.ClassDominatorRecord[] classDominatorRecords, ISnapshot snapshot)`

## Method Summary

Modifier and Type
Method
Description
`DominatorsSummary.ClassDominatorRecord[]`
`getClassDominatorRecords()`
Get the dominators summary grouped by classes
`DominatorsSummary.ClassloaderDominatorRecord[]`
`getClassloaderDominatorRecords()`
Get the dominators summary grouped by class loaders
`<C extends DominatorsSummary.ClassloaderDominatorRecord>
C[]`
`getClassloaderDominatorRecords(Class<C> factoryClass)`
`Object`
`getData()`
Returns data object attached to the summary.
`static Comparator<Object>`
`reverseComparator(Comparator<Object> comparator)`
Reverse the sort order.
`void`
`setData(Object data)`
Attaches arbitrary data object to the summary.

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

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

## Field Details

### COMPARE_BY_NAME

public static final Comparator<Object> COMPARE_BY_NAME
A comparator by name

### COMPARE_BY_DOMINATORS

public static final Comparator<Object> COMPARE_BY_DOMINATORS
A comparator by number of dominators

### COMPARE_BY_DOMINATED

public static final Comparator<Object> COMPARE_BY_DOMINATED
A comparator by number of dominated objects

### COMPARE_BY_DOMINATED_HEAP_SIZE

public static final Comparator<Object> COMPARE_BY_DOMINATED_HEAP_SIZE
A comparator by dominated heap size

### COMPARE_BY_DOMINATOR_HEAP_SIZE

public static final Comparator<Object> COMPARE_BY_DOMINATOR_HEAP_SIZE
A comparator by dominators heap size

### COMPARE_BY_DOMINATED_RETAINED_HEAP_SIZE

public static final Comparator<Object> COMPARE_BY_DOMINATED_RETAINED_HEAP_SIZE
A comparator by dominated objects' retained size

### COMPARE_BY_DOMINATOR_RETAINED_HEAP_SIZE

public static final Comparator<Object> COMPARE_BY_DOMINATOR_RETAINED_HEAP_SIZE
A comparator by dominators' retained size

## Constructor Details

### DominatorsSummary

public DominatorsSummary(DominatorsSummary.ClassDominatorRecord[] classDominatorRecords, ISnapshot snapshot)

## Method Details

### getData

public Object getData()
Returns data object attached to the summary. Needed for UI elements to store context.

### setData

public void setData(Object data)
Attaches arbitrary data object to the summary. Needed for UI elements to store context.

### getClassDominatorRecords

public DominatorsSummary.ClassDominatorRecord[] getClassDominatorRecords()
Get the dominators summary grouped by classes

Returns:
  ClassDominatorRecord[] the array of ClassDominatorRecords

### getClassloaderDominatorRecords

public DominatorsSummary.ClassloaderDominatorRecord[] getClassloaderDominatorRecords()
Get the dominators summary grouped by class loaders

Returns:
  ClassloaderDominatorRecord[] the array of ClassloaderDominatorRecords

### getClassloaderDominatorRecords

public <C extends DominatorsSummary.ClassloaderDominatorRecord> C[] getClassloaderDominatorRecords(Class<C> factoryClass)

### reverseComparator

public static Comparator<Object> reverseComparator(Comparator<Object> comparator)
Reverse the sort order.