Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.stats
Class Bin

java.lang.Object
  extended by com.jivesoftware.base.stats.Bin
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
Interval, SingleElementBin

public abstract class Bin
extends java.lang.Object
implements java.lang.Comparable

A Bin represents a collection of Elements in a Histogram. Bins typically represent either an interval or a single element. When generating a Histogram for a set of data, elements are first extracted from the data. Next the elements are assigned to Bins by a BinSequence object. The Histogram maintains a count for each Bin.


Constructor Summary
Bin()
           
 
Method Summary
abstract  int compareTo(java.lang.Object o)
          Compares this Bin to the given object (assumed to be another Bin).
abstract  boolean contains(Bin bin)
          Returns true if this Bin contains the given Bin.
abstract  boolean contains(Element e)
          See if this Bin contains the given Element.
abstract  boolean containsBegin()
          See if this Bin contains the beginning point.
abstract  boolean containsEnd()
          See if this Bin contains the end point.
abstract  Element getBegin()
          Get the first element in this Bin
abstract  Element getEnd()
          Get the last element in this Bin
 java.lang.Object getProperty(java.lang.Object name)
          Returns a property associated with this bin.
 void setProperty(java.lang.Object name, java.lang.Object value)
          Sets a property of this Bin.
abstract  java.lang.String toString()
          Convert this Bin to a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Bin

public Bin()
Method Detail

compareTo

public abstract int compareTo(java.lang.Object o)
Compares this Bin to the given object (assumed to be another Bin).

Specified by:
compareTo in interface java.lang.Comparable
See Also:
Comparable.compareTo(java.lang.Object)

toString

public abstract java.lang.String toString()
Convert this Bin to a String.

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

contains

public abstract boolean contains(Bin bin)
Returns true if this Bin contains the given Bin.

Parameters:
bin - the Bin to compare this object with.
Returns:
true if this Bin contains the given Bin, false otherwise.

contains

public abstract boolean contains(Element e)
See if this Bin contains the given Element.


getBegin

public abstract Element getBegin()
Get the first element in this Bin


containsBegin

public abstract boolean containsBegin()
See if this Bin contains the beginning point. Used to enable us to create open intervals (intervals that do not contain their endpoints) and closed intervals (intervals that contain their endpoints).


getEnd

public abstract Element getEnd()
Get the last element in this Bin


containsEnd

public abstract boolean containsEnd()
See if this Bin contains the end point. Used to enable us to create open intervals (intervals that do not contain their endpoints) and closed intervals (intervals that contain their endpoints).


getProperty

public java.lang.Object getProperty(java.lang.Object name)
Returns a property associated with this bin. Note, the default implementation may not be thread-safe.

Parameters:
name - the name of the property.
Returns:
the property as an Object or null if it does not exist.

setProperty

public void setProperty(java.lang.Object name,
                        java.lang.Object value)
Sets a property of this Bin. Note, the default implementation may not be thread-safe.

Parameters:
name - the name of the property.
value - the value of the property.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.