|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.clients.widgets.NumericToolkit
Field Summary | |
private static char |
DECIMAL_SEPARATOR
|
private static char |
EXPONENT_CHAR
|
private static DecimalFormatSymbols |
formatSymbols
|
private static char |
GROUPING_SEPARATOR
|
static int |
MAX_SIG_FIGS
|
private static char |
MINUS_SIGN
|
private static char |
ZERO_DIGIT
|
Constructor Summary | |
private |
NumericToolkit()
|
Method Summary | |
static int |
countSigFigs(String valueString)
Returns the number of significant figures that exist in the specified string representation of a floating point number. |
static int |
countSigFigs(String valueString,
Locale locale)
Returns the number of significant figures that exist in the specified string representation of a floating point number. |
static String |
doubleToString(double doubleValue)
Returns a string representation of the specified double rounded to non-zero digits. |
static String |
doubleToString(double doubleValue,
int numDigits)
Returns a string representation of the specified double rounded to the specified number of digits. |
static String |
doubleToString(double doubleValue,
int numDigits,
Locale locale)
Returns a string representation of the specified double rounded to the specified number of digits. |
static String |
doubleToString(double doubleValue,
Locale locale)
Returns a string representation of the specified double rounded to non-zero digits. |
static String |
makeLegalString(String stringValue)
|
static String |
makeLegalString(String stringValue,
Locale locale)
|
static double |
roundingEquivalent(double doubleValue,
int roundingDigits,
int roundingDirection)
Returns the largest or smallest double that, when rounded to the specified number of digits, is equal to the specified double rounded to the same number of digits. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MAX_SIG_FIGS
private static final DecimalFormatSymbols formatSymbols
private static final char DECIMAL_SEPARATOR
private static final char GROUPING_SEPARATOR
private static final char MINUS_SIGN
private static final char ZERO_DIGIT
private static final char EXPONENT_CHAR
Constructor Detail |
private NumericToolkit()
Method Detail |
public static int countSigFigs(String valueString)
valueString
- the string that represents the floating point number.
public static String doubleToString(double doubleValue, int numDigits)
doubleValue
- numDigits
-
public static String doubleToString(double doubleValue)
doubleValue
-
public static double roundingEquivalent(double doubleValue, int roundingDigits, int roundingDirection)
roundingDigits
- the number of digits that will be considered
when calculating the rounding equivalent.roundingDirection
- the rounding direction, up or down, that
will be used when calculating the rounding equivalent.doubleValue
-
public static int countSigFigs(String valueString, Locale locale)
valueString
- the string that represents the floating point number.
public static String doubleToString(double doubleValue, int numDigits, Locale locale)
doubleValue
- numDigits
-
public static String doubleToString(double doubleValue, Locale locale)
doubleValue
-
public static String makeLegalString(String stringValue, Locale locale)
public static String makeLegalString(String stringValue)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |