|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.analysis.HistogramItem
public class HistogramItem
An item to be displayed in a histogram. A HistogramItem iterates over a list calling the specified method on each object in the list. This method must return a value that can be cast into a double (i.e. float, int, double, short, etc.). These values are then distributed across the bins according to the number of bins, the lower bound, and the maximum value. For example, given 2 bins, a lower bound of 0 and a maximum value of 4. The first bin will contain all the values from 0 up to but not including 2, and the final bin will contain all the values from 2 up to and including 4. The displayed bin value (i.e. the height of the bar in the chart) is the number of value the fall within this bin. This class is created through the Histogram or HistogramStatistic classes and under normal circumstance should not be created by a user.
Histogram,
HistogramStatistic| Field Summary | |
|---|---|
protected java.lang.String[] |
labels
|
protected java.util.List |
list
|
protected long |
lowerBound
|
protected int |
numBins
|
protected BinDataSource |
source
|
| Constructor Summary | |
|---|---|
HistogramItem(java.util.List list,
BinDataSource source,
int numBins,
long lowerBound)
Constructs a HistogramItem whose bins are constructed from the specified list of objects, the specified BinDataSource, number of bins, and the specified lower bound. |
|
HistogramItem(java.util.List list,
BinDataSource source,
int numBins,
long lowerBound,
int maxIntegerDigits,
int maxFractionDigits)
Constructs a HistogramItem whose bins are constructed from the specified list of objects, the specified BinDataSource, number of bins, and the specified lower bound. |
|
HistogramItem(java.util.List list,
java.lang.String methodName,
int numBins,
long lowerBound)
Constructs a HistogramItem with the specified list of objects, the specified method to call on these objects, the specified number of bins, and the specified lower bound. |
|
HistogramItem(java.util.List list,
java.lang.String methodName,
int numBins,
long lowerBound,
int maxIntegerDigits,
int maxFractionDigits)
Constructs a HistogramItem with the specified list of objects, the specified method to call on these objects, the specified number of bins, and the specified lower bound. |
|
| Method Summary | |
|---|---|
java.lang.String[] |
getBinLabels()
Gets the bin labels. |
java.util.Vector |
getBinValues()
Gets a Vector of the bin values (ie how many items are in each bin). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List list
protected int numBins
protected long lowerBound
protected java.lang.String[] labels
protected BinDataSource source
| Constructor Detail |
|---|
public HistogramItem(java.util.List list,
java.lang.String methodName,
int numBins,
long lowerBound)
list - the list of objects on which to call the methodmethodName - the name of the method to call on the objectsnumBins - the number of bins in the histogramlowerBound - the lower bound of the histogram
public HistogramItem(java.util.List list,
java.lang.String methodName,
int numBins,
long lowerBound,
int maxIntegerDigits,
int maxFractionDigits)
list - the list of objects on which to call the methodmethodName - the name of the method to call on the objectsnumBins - the number of bins in the histogramlowerBound - the lower bound of the histogrammaxIntegerDigits - the maximum number of digits before the
decimal point in the bin labels. A value of -1 will record all the digits.maxFractionDigits - the maximum number of digits after the
decimal point in the bin labels. A value of -1 will record all the digits.
public HistogramItem(java.util.List list,
BinDataSource source,
int numBins,
long lowerBound)
list - the list of objects on which to call the methodsource - the BinDataSource that gets the bin values from the object
in the listnumBins - the number of bins in the histogramlowerBound - the lower bound of the histogram
public HistogramItem(java.util.List list,
BinDataSource source,
int numBins,
long lowerBound,
int maxIntegerDigits,
int maxFractionDigits)
list - the list of objects on which to call the methodsource - the BinDataSource that gets the bin values from the object
in the listnumBins - the number of bins in the histogramlowerBound - the lower bound of the histogrammaxIntegerDigits - the maximum number of digits before the
decimal point in the bin labels. A value of -1 will record all the digits.maxFractionDigits - the maximum number of digits after the
decimal point in the bin labels. A value of -1 will record all the digits.| Method Detail |
|---|
public java.util.Vector getBinValues()
public java.lang.String[] getBinLabels()
getBinValues()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||