|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.mat.snapshot.HistogramRecord
public class HistogramRecord
This class holds all basic data for a histogram record. Other classes inherit from it. It offers comparators to sort histogram records by their basic data. This pattern should be implemented by the classes inheriting from it as well.
Field Summary | |
---|---|
static java.util.Comparator<HistogramRecord> |
COMPARATOR_FOR_LABEL
|
static java.util.Comparator<HistogramRecord> |
COMPARATOR_FOR_NUMBEROFOBJECTS
|
static java.util.Comparator<HistogramRecord> |
COMPARATOR_FOR_RETAINEDHEAPSIZE
|
static java.util.Comparator<HistogramRecord> |
COMPARATOR_FOR_USEDHEAPSIZE
|
Constructor Summary | |
---|---|
HistogramRecord(java.lang.String label)
Create histogram record just with a label identifying it. |
|
HistogramRecord(java.lang.String label,
long numberOfObjects,
long usedHeapSize,
long retainedHeapSize)
Create histogram record with a label identifying it and its basic data. |
Method Summary | |
---|---|
java.lang.String |
getLabel()
Get label identifying the histogram record. |
long |
getNumberOfObjects()
Get number of objects this histogram record stands for. |
long |
getRetainedHeapSize()
Get number of retained bytes in heap area this histogram record stands for. |
long |
getUsedHeapSize()
Get number of bytes in heap area this histogram record stands for. |
void |
incNumberOfObjects()
Increment number of objects this histogram record stands for by 1. |
void |
incNumberOfObjects(long inc)
Increment number of objects this histogram record stands for. |
void |
incRetainedHeapSize(long inc)
|
void |
incUsedHeapSize(long inc)
Increment number of bytes in heap area this histogram record stands for. |
static java.util.Comparator<HistogramRecord> |
reverseComparator(java.util.Comparator<HistogramRecord> comparator)
Convenience method reversing the order of the given comparator. |
void |
setLabel(java.lang.String label)
Set label identifying the histogram record. |
void |
setNumberOfObjects(long numberOfObjects)
Set number of objects this histogram record stands for. |
void |
setRetainedHeapSize(long retainedHeapSize)
Set number of retained bytes in heap area this histogram record stands for. |
void |
setUsedHeapSize(long usedHeapSize)
Set number of bytes in heap area this histogram record stands for. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.util.Comparator<HistogramRecord> COMPARATOR_FOR_LABEL
public static final java.util.Comparator<HistogramRecord> COMPARATOR_FOR_NUMBEROFOBJECTS
public static final java.util.Comparator<HistogramRecord> COMPARATOR_FOR_USEDHEAPSIZE
public static final java.util.Comparator<HistogramRecord> COMPARATOR_FOR_RETAINEDHEAPSIZE
Constructor Detail |
---|
public HistogramRecord(java.lang.String label)
label
- label identifying the histogram recordpublic HistogramRecord(java.lang.String label, long numberOfObjects, long usedHeapSize, long retainedHeapSize)
label
- label identifying the histogram recordnumberOfObjects
- number of objects this histogram record stands forusedHeapSize
- number of bytes in heap area this histogram record stands forMethod Detail |
---|
public java.lang.String getLabel()
public void setLabel(java.lang.String label)
label
- label identifying the histogram recordpublic long getNumberOfObjects()
public void setNumberOfObjects(long numberOfObjects)
numberOfObjects
- number of objects this histogram record stands forpublic void incNumberOfObjects()
public void incNumberOfObjects(long inc)
inc
- number of objects by which the number of objects should be
incrementedpublic long getUsedHeapSize()
public void setUsedHeapSize(long usedHeapSize)
usedHeapSize
- number of bytes in heap area this histogram record stands forpublic void incUsedHeapSize(long inc)
inc
- number of bytes by which the number of bytes in heap area
should be incrementedpublic long getRetainedHeapSize()
Retained bytes means how much memory would be garbage collected if the references to the objects this histogram record stands for would be lost and the objects garbage collected.
public void setRetainedHeapSize(long retainedHeapSize)
Retained bytes means how much memory would be garbage collected if the references to the objects this histogram record stands for would be lost and the objects garbage collected.
retainedHeapSize
- number of retained bytes in heap area this histogram record
stands forpublic void incRetainedHeapSize(long inc)
public static java.util.Comparator<HistogramRecord> reverseComparator(java.util.Comparator<HistogramRecord> comparator)
List.get(int)
is
anyhow faster compared to an Iterator
.
comparator
- comparator for which a reversed comparator should be returned
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |