public class StringNumberUtilities extends Object
Constructor and Description |
---|
StringNumberUtilities() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isIntegerNumber(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(String word)
Returns true if the word is a natural number; else returns false
|
static boolean |
isNumber(String word)
Returns true if the word is a number; else returns false
|
static boolean |
isRealNumber(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(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(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(String word)
word
- An stringpublic static boolean isNaturalNumber(String word)
word
- An stringpublic static boolean isIntegerNumber(String word)
word
- An stringpublic static boolean isRealNumber(String word)
word
- An stringpublic static boolean isRealNumberWithIntegerExponent(String word)
word
- An stringpublic static boolean isRealNumberWithRealExponent(String word)
word
- An string