All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class crw.data3.Format

java.lang.Object
   |
   +----crw.data3.Format

public class Format
extends Object
Class to make double-value numbers suitable for display on screen. Public methods of form formX(double v) are to format an arbitrary double-value numbers into the form X. For example, the method formE() turns the number into a scientific format.

Version:
1.0 2-14-1998
Author:
C.R.Wie

Constructor Index

 o Format()
Default constructor with 3 significant digits, 1.0 as common factor, and 0 as exponent.
 o Format(double)
Constructor sets the common factor.
 o Format(int)
Constructor sets the number of significant digits.
 o Format(int, double)
Constructor sets the number of significant digits for the mentissa, and the common factor to be multiplied to all values which will be formatted with this Format object.

Method Index

 o formE(double)
Returns a String object corresponding to the double value after formatting.
 o formE(Vector)
Accepts a vector of Double objects and replaces each element, a Double object, by the String equivalent of the doule values after formatting.

Constructors

 o Format
  public Format()
Default constructor with 3 significant digits, 1.0 as common factor, and 0 as exponent.

 o Format
  public Format(int sigDigit)
Constructor sets the number of significant digits.

Parameters:
sigDigit - the number of significant digits.
 o Format
  public Format(double common)
Constructor sets the common factor. The common factor is multiplied to all double values before formatting.

 o Format
  public Format(int sigDigit,
                double common)
Constructor sets the number of significant digits for the mentissa, and the common factor to be multiplied to all values which will be formatted with this Format object.

Methods

 o formE
  public String formE(double val)
Returns a String object corresponding to the double value after formatting.

Parameters:
val - the double value to format.
Returns:
the String equivalent.
 o formE
  public Vector formE(Vector v) throws DataFormatException
Accepts a vector of Double objects and replaces each element, a Double object, by the String equivalent of the doule values after formatting.

Parameters:
v - the vector of double object. After this method
Returns:
the Vector v containes String objects.

All Packages  Class Hierarchy  This Package  Previous  Next  Index