public class NumberToolT
extends java.lang.Object
Constructor and Description |
---|
NumberToolT() |
Modifier and Type | Method and Description |
---|---|
static double |
limitIntoRange(double doubleIn,
double doubleBorderA,
double doubleBorderB)
Limits the given value doubleo a range.
|
static float |
limitIntoRange(float floatIn,
float floatBorderA,
float floatBorderB)
Limits the given value float into a range.
|
static int |
limitIntoRange(int intIn,
int intBorderA,
int intBorderB)
Limits the given value into a range.
|
static long |
limitIntoRange(long longIn,
long longBorderA,
long longBorderB)
Limits the given value long into a range.
|
static java.lang.String |
n2s(double in)
Generates a string from a "double" number.
|
static java.lang.String |
n2s(float in)
Generates a string from a "float" number.
|
static java.lang.String |
n2s(int in)
Generates a string from an "int" number.
|
static java.lang.String |
n2s(long in)
Generates a string from a "long" number.
|
static double |
o2d(java.lang.Object objIn,
double doubleNullReplacement)
Generates an double number by parsing the incoming object.
|
static java.lang.Double |
o2D(java.lang.Object objIn,
java.lang.Double dbLNullReplacement)
Generates a "Double" by parsing the incoming object.
|
static float |
o2f(java.lang.Object objIn,
float floatNullReplacement)
Generates an float number by parsing the incoming object.
|
static java.lang.Float |
o2F(java.lang.Object objIn,
java.lang.Float flTNullReplacement)
Generates a "Float" by parsing the incoming object.
|
static int |
o2i(java.lang.Object objIn,
int intNullReplacement)
Generates an integer number by parsing the incoming object.
|
static java.lang.Integer |
o2I(java.lang.Object objIn,
java.lang.Integer itgNullReplacement)
Generates an "Integer" by parsing the incoming object.
|
static long |
o2l(java.lang.Object objIn,
long longNullReplacement)
Generates an long number by parsing the incoming object.
|
static java.lang.Long |
o2L(java.lang.Object objIn,
java.lang.Long lnGNullReplacement)
Generates a "Long" by parsing the incoming object.
|
static java.lang.Number |
o2N(java.lang.Object objIn,
java.lang.Number nuMNullReplacement)
Generates a "Number" by parsing the incoming object.
|
public static int limitIntoRange(int intIn, int intBorderA, int intBorderB)
intIn
- - Incoming number.intBorderA
- - One border.intBorderB
- - Another border.public static long limitIntoRange(long longIn, long longBorderA, long longBorderB)
longIn
- - Incoming number.longBorderA
- - One border.longBorderB
- - Another border.public static float limitIntoRange(float floatIn, float floatBorderA, float floatBorderB)
floatIn
- - Incoming number.floatBorderA
- - One border.floatBorderB
- - Another border.public static double limitIntoRange(double doubleIn, double doubleBorderA, double doubleBorderB)
doubleIn
- - Incoming number.doubleBorderA
- - One border.doubleBorderB
- - Another border.public static java.lang.String n2s(int in)
in
- - The incoming number.public static java.lang.String n2s(long in)
in
- - The incoming number.public static java.lang.String n2s(float in)
in
- - The incoming number.public static java.lang.String n2s(double in)
in
- - The incoming number.public static java.lang.Number o2N(java.lang.Object objIn, java.lang.Number nuMNullReplacement)
objIn
- - The incoming object to parse.nuMNullReplacement
- - The replacement for null.public static java.lang.Integer o2I(java.lang.Object objIn, java.lang.Integer itgNullReplacement)
objIn
- - The incoming object to parse.itgNullReplacement
- - The replacement for null.public static java.lang.Long o2L(java.lang.Object objIn, java.lang.Long lnGNullReplacement)
objIn
- - The incoming object to parse.lnGNullReplacement
- - The replacement for null.public static java.lang.Float o2F(java.lang.Object objIn, java.lang.Float flTNullReplacement)
objIn
- - The incoming object to parse.flTNullReplacement
- - The replacement for null.public static java.lang.Double o2D(java.lang.Object objIn, java.lang.Double dbLNullReplacement)
objIn
- - The incoming object to parse.dbLNullReplacement
- - The replacement for null.public static int o2i(java.lang.Object objIn, int intNullReplacement)
objIn
- - The incoming object to parse.intNullReplacement
- - The replacement for null.public static long o2l(java.lang.Object objIn, long longNullReplacement)
objIn
- - The incoming object to parse.longNullReplacement
- - The replacement for null.public static float o2f(java.lang.Object objIn, float floatNullReplacement)
objIn
- - The incoming object to parse.floatNullReplacement
- - The replacement for null.public static double o2d(java.lang.Object objIn, double doubleNullReplacement)
objIn
- - The incoming object to parse.doubleNullReplacement
- - The replacement for null.