|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.myrrix.common.LangUtils
public final class LangUtils
General utility methods related to the language, or primitves.
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
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 parse
String
IllegalArgumentException - if input does not parse as a floating-point value, or 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_INFINITY
public 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 - modulus
l % m if l is nonnegative, (l % m) + m otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||