public final class LangUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isFinite(double d) |
static boolean |
isFinite(float f) |
static int |
mod(long l,
int m)
Computes
l mod m, such that the result is always in [0,m-1], for any long
value including negative values. |
static double |
parseDouble(String s) |
static float |
parseFloat(String s)
Parses a
float from a String as if by Float.valueOf(String), but disallows special
values like Float.NaN, Float.POSITIVE_INFINITY and Float.NEGATIVE_INFINITY. |
public static float parseFloat(String s)
float from a String as if by Float.valueOf(String), but disallows special
values like Float.NaN, Float.POSITIVE_INFINITY and Float.NEGATIVE_INFINITY.s - String to parseStringNumberFormatException - if input does not parse as a floating-point valueIllegalArgumentException - if input is infinite or Float.NaNparseDouble(String)public static boolean isFinite(float f)
Float.NaN, Float.POSITIVE_INFINITY or
Float.NEGATIVE_INFINITYpublic static double parseDouble(String s)
parseFloat(String)public static boolean isFinite(double d)
Double.NaN, Double.POSITIVE_INFINITY or
Double.NEGATIVE_INFINITYpublic static int mod(long l,
int m)
l mod m, such that the result is always in [0,m-1], for any long
value including negative values.l - long valuem - modulusl mod m if l is nonnegative, (l mod m) + m otherwiseCopyright © 2012-2013 Myrrix Ltd. All Rights Reserved.