|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.elca.el4j.util.codingsupport.NumberUtils
public final class NumberUtils
This class supports methods to handle with numbers. It covers only caps
of class org.springframework.util.NumberUtils.
| Method Summary | |
|---|---|
static boolean |
isNumberInsideBoundaries(double value,
double min,
double max)
Method to test if a given value is inside the given boundaries. |
static boolean |
isNumberInsideBoundaries(int value,
int min,
int max)
Method to test if a given value is inside the given boundaries. |
static boolean |
isNumberInsideBoundaries(long value,
long min,
long max)
Method to test if a given value is inside the given boundaries. |
static Double |
parseToDouble(String s)
Method to parse a string to a double. |
static Integer |
parseToInteger(String s)
Method to parse a string to an integer. |
static Long |
parseToLong(String s)
Method to parse a string to a long. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isNumberInsideBoundaries(int value,
int min,
int max)
value - Is the given value to test.min - Is the minimum that the value can be.max - Is the maximum that the value can be.
value is greater or equals than
minimum and is less or equals than maximum.
public static boolean isNumberInsideBoundaries(long value,
long min,
long max)
value - Is the given value to test.min - Is the minimum that the value can be.max - Is the maximum that the value can be.
value is greater or equals than
minimum and is less or equals than maximum.
public static boolean isNumberInsideBoundaries(double value,
double min,
double max)
value - Is the given value to test.min - Is the minimum that the value can be.max - Is the maximum that the value can be.
value is greater or equals than
minimum and is less or equals than maximum.public static Integer parseToInteger(String s)
s - Is the string to parse.
Integer object if success else
null.public static Long parseToLong(String s)
s - Is the string to parse.
Long object if success else
null.public static Double parseToDouble(String s)
s - Is the string to parse.
Double object if success else
null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||