Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.ujac.util.text
Class BigDecimalFormat  view BigDecimalFormat download BigDecimalFormat.java

java.lang.Object
  extended byjava.text.Format
      extended byjava.text.NumberFormat
          extended byjava.text.DecimalFormat
              extended byorg.ujac.util.text.BigDecimalFormat
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class BigDecimalFormat
extends java.text.DecimalFormat

Name: BigDecimalFormat
Description: A number format class, using the BigDecimal class to perform the rounding.
Log: $Log: BigDecimalFormat.java,v $
Log: Revision 1.4 2003/12/11 22:59:54 lauerc
Log: Fixed the number rounding at method format.
Log:
Log: Revision 1.3 2003/11/01 14:10:11 lauerc
Log: Fixed documentation.
Log:
Log: Revision 1.2 2003/11/01 12:06:38 lauerc
Log: Added copyright notice.
Log:
Log: Revision 1.1 2003/10/03 00:00:14 lauerc
Log: Initial revision.
Log:

Version:
$Revision: 1.4 $

Nested Class Summary
 
Nested classes inherited from class java.text.NumberFormat
java.text.NumberFormat.Field
 
Field Summary
private  int roundingMode
          The rounding mode.
 
Fields inherited from class java.text.DecimalFormat
 
Fields inherited from class java.text.NumberFormat
FRACTION_FIELD, INTEGER_FIELD
 
Constructor Summary
BigDecimalFormat()
          Constructs a BigDecimalFormat instance with no specific attributes.
BigDecimalFormat(java.lang.String pattern)
          Constructs a BigDecimalFormat instance with specific attributes.
BigDecimalFormat(java.lang.String pattern, java.text.DecimalFormatSymbols symbols)
          Constructs a BigDecimalFormat instance with specific attributes.
BigDecimalFormat(java.lang.String pattern, java.text.DecimalFormatSymbols symbols, int roundingMode)
          Constructs a BigDecimalFormat instance with specific attributes.
BigDecimalFormat(java.lang.String pattern, int roundingMode)
          Constructs a BigDecimalFormat instance with specific attributes.
 
Method Summary
 java.lang.StringBuffer format(double number, java.lang.StringBuffer result, java.text.FieldPosition fieldPosition)
          This method formats the specified double and appends it to a StringBuffer.
 int getRoundingMode()
          Gets the rounding mode.
 void setRoundingMode(int roundingMode)
          Sets the rounding mode.
 
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

roundingMode

private int roundingMode
The rounding mode.

Constructor Detail

BigDecimalFormat

public BigDecimalFormat()
Constructs a BigDecimalFormat instance with no specific attributes.


BigDecimalFormat

public BigDecimalFormat(java.lang.String pattern)
Constructs a BigDecimalFormat instance with specific attributes.


BigDecimalFormat

public BigDecimalFormat(java.lang.String pattern,
                        int roundingMode)
Constructs a BigDecimalFormat instance with specific attributes.


BigDecimalFormat

public BigDecimalFormat(java.lang.String pattern,
                        java.text.DecimalFormatSymbols symbols)
Constructs a BigDecimalFormat instance with specific attributes.


BigDecimalFormat

public BigDecimalFormat(java.lang.String pattern,
                        java.text.DecimalFormatSymbols symbols,
                        int roundingMode)
Constructs a BigDecimalFormat instance with specific attributes.

Method Detail

format

public java.lang.StringBuffer format(double number,
                                     java.lang.StringBuffer result,
                                     java.text.FieldPosition fieldPosition)
Description copied from class: java.text.NumberFormat
This method formats the specified double and appends it to a StringBuffer.


getRoundingMode

public int getRoundingMode()
Gets the rounding mode.


setRoundingMode

public void setRoundingMode(int roundingMode)
Sets the rounding mode.