Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.stats.bin
Class DefaultBinSequence

java.lang.Object
  extended by com.jivesoftware.base.stats.bin.DefaultBinSequence
All Implemented Interfaces:
BinSequence

public class DefaultBinSequence
extends java.lang.Object
implements BinSequence

DefaultBinSequence provides a getBin() function that wraps all incoming Elements in a SingleElementBin. If the incoming elements are non-numerical this is a good BinSequence object to use for a Histogram, since it doesn't assume elements have a working toLong() function. Because the Bins correspond to possibly non-numerical objects, the DefaultBinSequence object cannot generate a sequence of bins, and instead the getBins() and getNext() methods return null.


Constructor Summary
DefaultBinSequence()
          Creates new DefaultBinSequence
 
Method Summary
 Bin getBin(Element element)
          Produce a SingleElementBin from the given element.
 Bin[] getBins(Element minElement, Element maxElement)
          getBins() does just returns null because we don't know anything about the structure of the Bins we generate with getBin()
 Bin[] getBins(Element minElement, Element maxElement, boolean containsMin, boolean containsMax)
          getBins() does just returns null because we don't know anything about the structure of the Bins we generate with getBin()
 Bin getNext(Bin bin)
          getNext() does just returns null because we don't know anything about the structure of the Bins we generate with getBin()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBinSequence

public DefaultBinSequence()
Creates new DefaultBinSequence

Method Detail

getBin

public Bin getBin(Element element)
Produce a SingleElementBin from the given element.

Specified by:
getBin in interface BinSequence
Parameters:
element - The element to be mapped to a Bin
Returns:
A SingleElementBin containing the given element

getNext

public Bin getNext(Bin bin)
getNext() does just returns null because we don't know anything about the structure of the Bins we generate with getBin()

Specified by:
getNext in interface BinSequence
Parameters:
bin - The current Bin
Returns:
null

getBins

public Bin[] getBins(Element minElement,
                     Element maxElement)
getBins() does just returns null because we don't know anything about the structure of the Bins we generate with getBin()

Specified by:
getBins in interface BinSequence
Parameters:
minElement - An element that should be contained in the first Bin.
maxElement - An element that should be contained in the last Bin.
Returns:
null

getBins

public Bin[] getBins(Element minElement,
                     Element maxElement,
                     boolean containsMin,
                     boolean containsMax)
getBins() does just returns null because we don't know anything about the structure of the Bins we generate with getBin()

Specified by:
getBins in interface BinSequence
Parameters:
minElement - An element that defines the first Bin.
maxElement - An element that defines the last Bin.
containsMin - Should the list contain the first Bin?
containsMax - Should the list contain the last Bin?
Returns:
null

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.