Class Util
- java.lang.Object
-
- org.eclipse.nebula.paperclips.core.internal.util.Util
-
public class Util extends java.lang.Object
General use convenience methods: null checking, equality
-
-
Constructor Summary
Constructors Constructor Description Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
equal(double left, double right)
Returns whether the arguments are equal.private static boolean
equal(java.lang.Object[] left, java.lang.Object[] right)
static boolean
equal(java.lang.Object left, java.lang.Object right)
Returns whether the arguments are equal.static void
noNulls(java.lang.Object[] objs)
Triggers a SWT.ERROR_NULL_ARGUMENT exception if the argument or any of its elements is null.static void
noNulls(java.util.List<?> list)
Triggers a SWT.ERROR_NULL_ARGUMENT exception if the argument or any of its elements is null.static void
notNull(java.lang.Object obj)
Triggers a SWT.ERROR_NULL_ARGUMENT exception if the argument is null.static void
notNull(java.lang.Object o1, java.lang.Object o2)
Triggers a SWT.ERROR_NULL_ARGUMENT exception if any argument is null.static void
notNull(java.lang.Object o1, java.lang.Object o2, java.lang.Object o3)
Triggers a SWT.ERROR_NULL_ARGUMENT exception if any argument is null.static boolean
sameClass(java.lang.Object left, java.lang.Object right)
Returns whether the objects are of the same class.
-
-
-
Method Detail
-
sameClass
public static boolean sameClass(java.lang.Object left, java.lang.Object right)
Returns whether the objects are of the same class.- Parameters:
left
- object to testright
- object to test- Returns:
- whether the objects are of the same class.
-
equal
public static boolean equal(java.lang.Object left, java.lang.Object right)
Returns whether the arguments are equal.- Parameters:
left
- object to testright
- object to test- Returns:
- whether the arguments are equal.
-
equal
private static boolean equal(java.lang.Object[] left, java.lang.Object[] right)
-
equal
public static boolean equal(double left, double right)
Returns whether the arguments are equal.- Parameters:
left
- double value to testright
- double value to test- Returns:
- whether the arguments are equal.
-
noNulls
public static void noNulls(java.util.List<?> list)
Triggers a SWT.ERROR_NULL_ARGUMENT exception if the argument or any of its elements is null.- Parameters:
list
- a list to test for null elements.
-
noNulls
public static void noNulls(java.lang.Object[] objs)
Triggers a SWT.ERROR_NULL_ARGUMENT exception if the argument or any of its elements is null.- Parameters:
objs
- an array to test for null elements.
-
notNull
public static void notNull(java.lang.Object obj)
Triggers a SWT.ERROR_NULL_ARGUMENT exception if the argument is null.- Parameters:
obj
- the object to test for null.
-
notNull
public static void notNull(java.lang.Object o1, java.lang.Object o2)
Triggers a SWT.ERROR_NULL_ARGUMENT exception if any argument is null.- Parameters:
o1
- an object to test for null.o2
- an object to test for null.
-
notNull
public static void notNull(java.lang.Object o1, java.lang.Object o2, java.lang.Object o3)
Triggers a SWT.ERROR_NULL_ARGUMENT exception if any argument is null.- Parameters:
o1
- an object to test for null.o2
- an object to test for null.o3
- an object to test for null.
-
-