NetCharts Pro

netcharts.pro.charts.histogram
Class NFHistogramBin

java.lang.Object
  extended by netcharts.pro.common.NFBaseClass
      extended by netcharts.pro.charts.histogram.NFHistogramBin
All Implemented Interfaces:
java.lang.Cloneable, NFCDLGenerator

public class NFHistogramBin
extends NFBaseClass
implements NFCDLGenerator


Field Summary
static int AUTO
          The algorithm will automatically define the bin size (defaulted to 3).
static java.util.Hashtable binTypeMap
          Histogram bin type hashtable
static int BYNUMBER
          The users specifies the number of bins.
static int BYWIDTH
          The user specifies the width of a bin.
 
Constructor Summary
NFHistogramBin()
          Constructs a default histogram bin object with bin type set to AUTO and bin size set to 3.
NFHistogramBin(int binType, int binSize)
          Constructs a histogram bin object with the given bin type and bin size.
 
Method Summary
 int getBinSize()
          Gets the current histogram bin size.
 int getBinType()
          Gets the current histogram bin type.
 java.lang.String getCDL()
          Generate CDL parameters representing this histogram bin
 void getCDL(java.lang.StringBuffer sb)
          Append CDL parameters representing this histogram bin to the given StringBuffer.
 void setBinSize(int binSize)
          Sets the histogram bin size
 void setBinSize(java.lang.Integer binSize)
          Sets the histogram bin size
 void setBinType(int binType)
          Sets the histogram bin type
 void setCDL(java.lang.Object cdlObject)
          Configures this histogram bin object from a CDL parameter object.
 void setCDL(java.lang.String cdl)
          Configures this histogram bin object from a CDL parameter string representation.
 int setCDL(java.lang.String[] elements, int offset)
          Configures this histogram bin object from a CDL parameter string representation.
 java.lang.String toString()
          Returns a string representing this histogram bin.
 
Methods inherited from class netcharts.pro.common.NFBaseClass
clone, getModified, getUserObject, setModified, setUserObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AUTO

public static final int AUTO
The algorithm will automatically define the bin size (defaulted to 3).

See Also:
Constant Field Values

BYNUMBER

public static final int BYNUMBER
The users specifies the number of bins.

See Also:
Constant Field Values

BYWIDTH

public static final int BYWIDTH
The user specifies the width of a bin.

See Also:
Constant Field Values

binTypeMap

public static java.util.Hashtable binTypeMap
Histogram bin type hashtable

Constructor Detail

NFHistogramBin

public NFHistogramBin()
Constructs a default histogram bin object with bin type set to AUTO and bin size set to 3.


NFHistogramBin

public NFHistogramBin(int binType,
                      int binSize)
Constructs a histogram bin object with the given bin type and bin size. If the binType is AUTO then the binSize parameter is ignored and the binSize is set to the default value of 3.

Parameters:
binType - type of bin either AUTO, BYNUMBER, BYWIDTH
binSize - size of the bin
Method Detail

setBinType

public void setBinType(int binType)
Sets the histogram bin type

Parameters:
binType - type of bin either AUTO, BYNUMBER, BYWIDTH

getBinType

public int getBinType()
Gets the current histogram bin type.

Returns:
the histogram bin type or AUTO if not defined.

setBinSize

public void setBinSize(int binSize)
Sets the histogram bin size

Parameters:
binSize - size of bin

setBinSize

public void setBinSize(java.lang.Integer binSize)
Sets the histogram bin size

Parameters:
binSize - size of bin

getBinSize

public int getBinSize()
Gets the current histogram bin size.

Returns:
the histogram bin size or 3 if not defined.

getCDL

public java.lang.String getCDL()
Generate CDL parameters representing this histogram bin

Specified by:
getCDL in interface NFCDLGenerator
Returns:
CDL in the form: (binType, binSize)

getCDL

public void getCDL(java.lang.StringBuffer sb)
Append CDL parameters representing this histogram bin to the given StringBuffer.

Parameters:
sb - target buffer to append the CDL parameters

toString

public java.lang.String toString()
Returns a string representing this histogram bin. The string that is returned is the same as calling getCDL()

Specified by:
toString in interface NFCDLGenerator
Overrides:
toString in class java.lang.Object
Returns:
string in the the form: (binType, binSize)

setCDL

public void setCDL(java.lang.Object cdlObject)
Configures this histogram bin object from a CDL parameter object.

Parameters:
cdlObject - CDL in string form or in a user object.

setCDL

public void setCDL(java.lang.String cdl)
Configures this histogram bin object from a CDL parameter string representation.

Specified by:
setCDL in interface NFCDLGenerator
Parameters:
cdl - CDL in string form: (binType, binSize)

setCDL

public int setCDL(java.lang.String[] elements,
                  int offset)
Configures this histogram bin object from a CDL parameter string representation.

Parameters:
elements - array of parameter elements containing consecutive elements histogram bin type and histogram bin size
offset - offset into the elements array

NetCharts Pro


Visual Mining, Inc.
2099 Gaither Rd.
Suite 220
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2011
All Rights Reserved.

NetCharts Pro TM is a registered trademark of Visual Mining, Inc. Other brands and their products are trademarks of their respective holders.

Last Modified: Jun 28, 2011