weka.classifiers.functions.pace
Class FlexibleDecimalFormat

java.lang.Object
  extended byjava.text.Format
      extended byjava.text.NumberFormat
          extended byjava.text.DecimalFormat
              extended byweka.classifiers.functions.pace.FlexibleDecimalFormat
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class FlexibleDecimalFormat
extends java.text.DecimalFormat

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.text.NumberFormat
java.text.NumberFormat.Field
 
Nested classes inherited from class java.text.Format
 
Field Summary
private  int decimalDigits
           
private  int digits
           
private  boolean exp
           
private  int expDecimalDigits
           
private  int expIntDigits
           
private  boolean grouping
           
private  int intDigits
           
private  java.text.DecimalFormat nf
           
private  int power
           
private  boolean sign
           
private  boolean trailing
           
 
Fields inherited from class java.text.DecimalFormat
 
Fields inherited from class java.text.NumberFormat
FRACTION_FIELD, INTEGER_FIELD
 
Constructor Summary
FlexibleDecimalFormat()
           
FlexibleDecimalFormat(double d)
           
FlexibleDecimalFormat(int digits)
           
FlexibleDecimalFormat(int digits, boolean trailing)
           
FlexibleDecimalFormat(int digits, boolean exp, boolean trailing, boolean grouping)
           
 
Method Summary
private  int decimalDigits(double d, boolean expo)
           
 java.lang.StringBuffer format(double number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
           
 java.lang.StringBuffer formatString(java.lang.String str)
           
 void grouping(boolean grouping)
           
private static int intDigits(double d)
           
 boolean needExponentialFormat(double d)
           
private  void newFormat(double d)
           
private static void println(java.lang.Object obj)
           
private  void setFormat()
           
private  void setFormat(double d)
           
 void update(double d)
           
 int width()
           
 
Methods inherited from class java.text.DecimalFormat
applyLocalizedPattern, applyPattern, clone, equals, format, formatToCharacterIterator, getCurrency, getDecimalFormatSymbols, getGroupingSize, getMultiplier, getNegativePrefix, getNegativeSuffix, getPositivePrefix, getPositiveSuffix, hashCode, isDecimalSeparatorAlwaysShown, parse, setCurrency, setDecimalFormatSymbols, setDecimalSeparatorAlwaysShown, setGroupingSize, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setMultiplier, setNegativePrefix, setNegativeSuffix, setPositivePrefix, setPositiveSuffix, toLocalizedPattern, toPattern
 
Methods inherited from class java.text.NumberFormat
format, format, format, getAvailableLocales, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getIntegerInstance, getIntegerInstance, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, isGroupingUsed, isParseIntegerOnly, parse, parseObject, setGroupingUsed, setParseIntegerOnly
 
Methods inherited from class java.text.Format
format, parseObject
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nf

private java.text.DecimalFormat nf

digits

private int digits

exp

private boolean exp

intDigits

private int intDigits

decimalDigits

private int decimalDigits

expIntDigits

private int expIntDigits

expDecimalDigits

private int expDecimalDigits

power

private int power

trailing

private boolean trailing

grouping

private boolean grouping

sign

private boolean sign
Constructor Detail

FlexibleDecimalFormat

public FlexibleDecimalFormat()

FlexibleDecimalFormat

public FlexibleDecimalFormat(int digits)

FlexibleDecimalFormat

public FlexibleDecimalFormat(int digits,
                             boolean trailing)

FlexibleDecimalFormat

public FlexibleDecimalFormat(int digits,
                             boolean exp,
                             boolean trailing,
                             boolean grouping)

FlexibleDecimalFormat

public FlexibleDecimalFormat(double d)
Method Detail

newFormat

private void newFormat(double d)

update

public void update(double d)

intDigits

private static int intDigits(double d)

decimalDigits

private int decimalDigits(double d,
                          boolean expo)

needExponentialFormat

public boolean needExponentialFormat(double d)

grouping

public void grouping(boolean grouping)

println

private static void println(java.lang.Object obj)

setFormat

private void setFormat()

setFormat

private void setFormat(double d)

format

public java.lang.StringBuffer format(double number,
                                     java.lang.StringBuffer toAppendTo,
                                     java.text.FieldPosition pos)

width

public int width()

formatString

public java.lang.StringBuffer formatString(java.lang.String str)