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
-
Format()
- Default constructor with 3 significant digits, 1.0 as common
factor, and 0 as exponent.
-
Format(double)
- Constructor sets the common factor.
-
Format(int)
- Constructor sets the number of significant digits.
-
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.
-
formE(double)
- Returns a String object corresponding to the double value
after formatting.
-
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.
Format
public Format()
- Default constructor with 3 significant digits, 1.0 as common
factor, and 0 as exponent.
Format
public Format(int sigDigit)
- Constructor sets the number of significant digits.
- Parameters:
- sigDigit - the number of significant digits.
Format
public Format(double common)
- Constructor sets the common factor. The common factor is
multiplied to all double values before formatting.
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.
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.
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