Class HistogramBucket
java.lang.Object
org.eclipse.tracecompass.tmf.ui.views.histogram.HistogramBucket
This class counts events for a particular time range, taking into account origin of the event.
- Author:
- Xavier Raynaud
-
Constructor Summary
ConstructorsConstructorDescriptionHistogramBucket(int traceCount) ConstructorHistogramBucket(int... values) ConstructorCopy ConstructorMerge Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(HistogramBucket histogramBucket) Merge the given bucket in this one.voidaddEvent(int traceIndex) Add an event in this bucketbooleanintgetNbEvent(int traceIndex) Gets the number of event in this bucket belonging to given traceintintinthashCode()booleanisEmpty()toString()
-
Constructor Details
-
HistogramBucket
public HistogramBucket(int traceCount) Constructor- Parameters:
traceCount- number of traces of the experiment.
-
HistogramBucket
public HistogramBucket(int... values) Constructor- Parameters:
values- list of values
-
HistogramBucket
Copy Constructor- Parameters:
b- a HistogramBucket to copy
-
HistogramBucket
Merge Constructor- Parameters:
b1- a HistogramBucketb2- another HistogramBucket
-
-
Method Details
-
getNbEvents
public int getNbEvents()- Returns:
- the number of events in this bucket
-
addEvent
public void addEvent(int traceIndex) Add an event in this bucket- Parameters:
traceIndex- a trace index - seeHistogramDataModel.setTrace(org.eclipse.tracecompass.tmf.core.trace.ITmfTrace).
-
getNbEvent
public int getNbEvent(int traceIndex) Gets the number of event in this bucket belonging to given trace- Parameters:
traceIndex- a trace index- Returns:
- the number of events in this bucket belonging to the given trace
-
getNbTraces
public int getNbTraces()- Returns:
- the number of traces in this bucket
-
add
Merge the given bucket in this one.- Parameters:
histogramBucket- a bucket to merge in this one.
-
isEmpty
public boolean isEmpty()- Returns:
trueif this bucket contains no event,falseotherwise.
-
hashCode
public int hashCode() -
equals
-
toString
-