Package org.jfree.data.statistics
Class SimpleHistogramBin
java.lang.Object
org.jfree.data.statistics.SimpleHistogramBin
- All Implemented Interfaces:
Serializable,Cloneable,Comparable,PublicCloneable
public class SimpleHistogramBin extends Object implements Comparable, Cloneable, PublicCloneable, Serializable
A bin for the
SimpleHistogramDataset.- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description SimpleHistogramBin(double lowerBound, double upperBound)Creates a new bin.SimpleHistogramBin(double lowerBound, double upperBound, boolean includeLowerBound, boolean includeUpperBound)Creates a new bin. -
Method Summary
Modifier and Type Method Description booleanaccepts(double value)Returnstrueif the specified value belongs in the bin, andfalseotherwise.Objectclone()Returns a clone of the bin.intcompareTo(Object obj)Compares the bin to an arbitrary object and returns the relative ordering.booleanequals(Object obj)Tests this bin for equality with an arbitrary object.intgetItemCount()Returns the item count.doublegetLowerBound()Returns the lower bound.doublegetUpperBound()Return the upper bound.booleanoverlapsWith(SimpleHistogramBin bin)Returnstrueif this bin overlaps with the specified bin, andfalseotherwise.voidsetItemCount(int count)Sets the item count.
-
Constructor Details
-
SimpleHistogramBin
Creates a new bin.- Parameters:
lowerBound- the lower bound (inclusive).upperBound- the upper bound (inclusive);
-
SimpleHistogramBin
public SimpleHistogramBin(double lowerBound, double upperBound, boolean includeLowerBound, boolean includeUpperBound)Creates a new bin.- Parameters:
lowerBound- the lower bound.upperBound- the upper bound.includeLowerBound- include the lower bound?includeUpperBound- include the upper bound?
-
-
Method Details
-
getLowerBound
Returns the lower bound.- Returns:
- The lower bound.
-
getUpperBound
Return the upper bound.- Returns:
- The upper bound.
-
getItemCount
Returns the item count.- Returns:
- The item count.
-
setItemCount
Sets the item count.- Parameters:
count- the item count.
-
accepts
Returnstrueif the specified value belongs in the bin, andfalseotherwise.- Parameters:
value- the value.- Returns:
- A boolean.
-
overlapsWith
Returnstrueif this bin overlaps with the specified bin, andfalseotherwise.- Parameters:
bin- the other bin (nullnot permitted).- Returns:
- A boolean.
-
compareTo
Compares the bin to an arbitrary object and returns the relative ordering.- Specified by:
compareToin interfaceComparable- Parameters:
obj- the object.- Returns:
- An integer indicating the relative ordering of the this bin and the given object.
-
equals
Tests this bin for equality with an arbitrary object. -
clone
Returns a clone of the bin.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classObject- Returns:
- A clone.
- Throws:
CloneNotSupportedException- not thrown by this class.
-