public class StringNumberUtilities
extends java.lang.Object
Constructor and Description |
---|
StringNumberUtilities() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isIntegerNumber(java.lang.String word)
Returns true if the word is an integer number; else returns false
If it's a natural number, it's an integer number
|
static boolean |
isNaturalNumber(java.lang.String word)
Returns true if the word is a natural number; else returns false
|
static boolean |
isNumber(java.lang.String word)
Returns true if the word is a number; else returns false
|
static boolean |
isRealNumber(java.lang.String word)
Returns true if the word is a real number; else returns false
It's supposed that '.' is the symbol for separate integer from decimal part
If it's a natural or integer, it's a real number
|
static boolean |
isRealNumberWithIntegerExponent(java.lang.String word)
Returns true if the word is a real number with or without the 'E' (or 'e') symbol for the exponent; else returns false
It's supposed that '.' is the symbol for separate integer from decimal part in the base. |
static boolean |
isRealNumberWithRealExponent(java.lang.String word)
Returns true if the word is a real number with or without the 'E' (or 'e') symbol for the exponent; else returns false
It's supposed that '.' is the symbol for separate integer from decimal part, in the base and the exponent of the number
If it's a natural, integer, real number or real number with integer exponent, it's a real number with real exponent
|
public static boolean isNumber(java.lang.String word)
word
- An stringpublic static boolean isNaturalNumber(java.lang.String word)
word
- An stringpublic static boolean isIntegerNumber(java.lang.String word)
word
- An stringpublic static boolean isRealNumber(java.lang.String word)
word
- An stringpublic static boolean isRealNumberWithIntegerExponent(java.lang.String word)
word
- An stringpublic static boolean isRealNumberWithRealExponent(java.lang.String word)
word
- An string