|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.javelot.functionalj.util.Utils
Contains general utility methods.
| Method Summary | |
static void |
disallowNull(Object p_parameter,
String p_name)
Verifies if the parameter is null, and throws an exception if it
is. |
static boolean |
safeEquals(Object p_first,
Object p_second)
Verifies if two objects are equal, by considering two null values
to be equal, a null and non-null value not to be
equal, and by using the equals() method to compare two
non-null values. |
static String |
toString(Object[] p_array)
Returns a String representation of an array of objects. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static void disallowNull(Object p_parameter,
String p_name)
null, and throws an exception if it
is. Does nothing if the parameter is not null.
p_parameter - the parameter that is checked for null.p_name - the name of the parameter. This name will be
displayed as part of the message of the FunctionException, if thrown, as
follows: "The {name} parameter cannot be null."
FunctionException - thrown if the parameter is null.public static String toString(Object[] p_array)
p_array - the array for which to construct a String representation.
"[A, B, C, D]", with a String
representation of each object in the array.
public static boolean safeEquals(Object p_first,
Object p_second)
null values
to be equal, a null and non-null value not to be
equal, and by using the equals() method to compare two
non-null values.
p_first - the first object to consider for equality.p_second - the second object to consider for equality.
true if the two objects are considered equal,
false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||