|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.common.CommonUtil
public final class CommonUtil
General utility functions.
| Method Summary | |
|---|---|
static int |
compareNull(java.lang.Object o1,
java.lang.Object o2)
Compares two objects that implement the java.lang.Comparable interface that may also be null. |
static boolean |
equalsNull(java.lang.Object o1,
java.lang.Object o2)
Checks if two objects are equal or both null. |
static int |
getJavaVersionInt()
Gets the java version as 3 digit integer (e\.g\. 141). |
static java.lang.String |
getJavaVersionStr()
Gets the java version as string (e\.g\. "1.4.1"). |
static boolean |
isJava14()
Checks if the current Java version is 1\.4 or higher. |
static int |
rnd(double v)
Rounds a double to an integer value using neares-number-rounding. |
static int |
rnd(float v)
Rounds a float to an integer value using neares-number-rounding. |
static java.lang.String |
setSystemProperty(java.lang.String key,
java.lang.String value)
Sets the spcecified system property, including null value check. |
static java.lang.String |
toStringNull(java.lang.Object o)
Null-safe toString implementation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean equalsNull(java.lang.Object o1,
java.lang.Object o2)
o1 - First objecto2 - Second object
public static int compareNull(java.lang.Object o1,
java.lang.Object o2)
o1 - First object or nullo2 - Second object or null
java.lang.ClassCastException - If one of the objects does not implement the Comparable interfacepublic static java.lang.String toStringNull(java.lang.Object o)
o - Object to print
public static int rnd(float v)
v - Value to round
public static int rnd(double v)
v - Value to round
public static java.lang.String setSystemProperty(java.lang.String key,
java.lang.String value)
key - Property namevalue - Value or null
public static boolean isJava14()
public static java.lang.String getJavaVersionStr()
public static int getJavaVersionInt()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||