|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsuramadu.util.stats.HistogramBin
This class represents a single bin in a histogram. It contains the complete definition of the criteria for being a member of this bin. By calling this classes isMember() method, it can be immediately determined whether a particular value is a member of this bin.
Range
Constructor Summary | |
HistogramBin(java.lang.Comparable loBound,
java.lang.Comparable hiBound)
Creates a new instance of HistogramBin with the specified low and high bounds. |
Method Summary | |
boolean |
add(java.lang.Number n)
Adds the specified Number object to this range if it truly falls within it. |
int |
compareTo(java.lang.Object o)
Comparaable Interface Implementation |
boolean |
contains(java.lang.Number n)
Determines if a given number falls within the Range described by this HistogramBin. |
long |
getCount()
Gets the current count for this HistogramBin. |
java.lang.Comparable |
getHiBound()
Gets the high bound of the Range described by this HistogramBin. |
java.lang.Comparable |
getLoBound()
Gets the low bound of the Range described by this HistorgramBin |
Range |
merge(Range range)
A helper method that will merge this HistogramBin with another HistogramBin iff the ranges are adjescent. |
boolean |
overlaps(HistogramBin bin)
Determines if the specified HistogramBin overlaps this HistogramBin. |
java.lang.String |
toString()
Creates a String representation fo this HistogramBin indicating its low bound, high bound, and current counter. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public HistogramBin(java.lang.Comparable loBound, java.lang.Comparable hiBound)
loBound
- The low bound of the range represented by this HistogramBin. This is the value
that is less than or equal to all values that are enclosed by this range.hiBound
- The high bound of the range represented by this HistogramBin. This is the value
that is grater than all values that are enclosed by this range.Range
Method Detail |
public boolean add(java.lang.Number n)
n
- the Number object to add
public java.lang.Comparable getLoBound()
getLoBound
in interface Range
public java.lang.Comparable getHiBound()
getHiBound
in interface Range
public Range merge(Range range)
merge
in interface Range
range
- the Range object to merge with this range.
Range
public long getCount()
getCount
in interface Range
Range.getHiBound()
,
Range.getLoBound()
public boolean contains(java.lang.Number n)
n
- The Number object to test for inclusion in this HistogramBin's Range.
Range
public boolean overlaps(HistogramBin bin)
bin
- The HistogramBin to test.
HistogramBin
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- The Object that we will be comparing.
Comparable
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |