gnu.math
Class FixedRealFormat

java.lang.Object
  extended by java.text.Format
      extended by gnu.math.FixedRealFormat
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class FixedRealFormat
extends java.text.Format

Format a real number using a fixed-point format. Used for Common Lisp specs ~F and ~$; also C-style %f.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.text.Format
java.text.Format.Field
 
Field Summary
 boolean internalPad
           
 char overflowChar
           
 char padChar
           
 int scale
           
 boolean showPlus
           
 int width
           
 
Constructor Summary
FixedRealFormat()
           
 
Method Summary
 java.lang.StringBuffer format(double num, java.lang.StringBuffer sbuf, java.text.FieldPosition fpos)
           
 java.lang.StringBuffer format(long num, java.lang.StringBuffer sbuf, java.text.FieldPosition fpos)
           
 java.lang.StringBuffer format(java.lang.Object num, java.lang.StringBuffer sbuf, java.text.FieldPosition fpos)
           
 void format(RatNum number, boolean negative, java.lang.StringBuffer sbuf, java.text.FieldPosition fpos)
           
 void format(RatNum number, java.lang.StringBuffer sbuf, java.text.FieldPosition fpos)
           
 void format(RealNum number, java.lang.StringBuffer sbuf, java.text.FieldPosition fpos)
           
 int getMaximumFractionDigits()
           
 int getMinimumIntegerDigits()
           
 java.lang.Number parse(java.lang.String text, java.text.ParsePosition status)
           
 java.lang.Object parseObject(java.lang.String text, java.text.ParsePosition status)
           
 void setMaximumFractionDigits(int d)
           
 void setMinimumIntegerDigits(int i)
           
 
Methods inherited from class java.text.Format
clone, format, formatToCharacterIterator, parseObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

public int width

scale

public int scale

padChar

public char padChar

showPlus

public boolean showPlus

internalPad

public boolean internalPad

overflowChar

public char overflowChar
Constructor Detail

FixedRealFormat

public FixedRealFormat()
Method Detail

getMaximumFractionDigits

public int getMaximumFractionDigits()

getMinimumIntegerDigits

public int getMinimumIntegerDigits()

setMaximumFractionDigits

public void setMaximumFractionDigits(int d)

setMinimumIntegerDigits

public void setMinimumIntegerDigits(int i)

format

public void format(RatNum number,
                   boolean negative,
                   java.lang.StringBuffer sbuf,
                   java.text.FieldPosition fpos)

format

public void format(RatNum number,
                   java.lang.StringBuffer sbuf,
                   java.text.FieldPosition fpos)

format

public void format(RealNum number,
                   java.lang.StringBuffer sbuf,
                   java.text.FieldPosition fpos)

format

public java.lang.StringBuffer format(long num,
                                     java.lang.StringBuffer sbuf,
                                     java.text.FieldPosition fpos)

format

public java.lang.StringBuffer format(double num,
                                     java.lang.StringBuffer sbuf,
                                     java.text.FieldPosition fpos)

format

public java.lang.StringBuffer format(java.lang.Object num,
                                     java.lang.StringBuffer sbuf,
                                     java.text.FieldPosition fpos)
Specified by:
format in class java.text.Format

parse

public java.lang.Number parse(java.lang.String text,
                              java.text.ParsePosition status)

parseObject

public java.lang.Object parseObject(java.lang.String text,
                                    java.text.ParsePosition status)
Specified by:
parseObject in class java.text.Format