Class Util

java.lang.Object
net.sf.paperclips.internal.Util

public class Util extends Object
General use convenience methods: null checking, equality
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    equal(double left, double right)
    Returns whether the arguments are equal.
    static boolean
    equal(Object left, Object right)
    Returns whether the arguments are equal.
    static void
    noNulls(Object[] objs)
    Triggers a SWT.ERROR_NULL_ARGUMENT exception if the argument or any of its elements is null.
    static void
    noNulls(List list)
    Triggers a SWT.ERROR_NULL_ARGUMENT exception if the argument or any of its elements is null.
    static void
    Triggers a SWT.ERROR_NULL_ARGUMENT exception if the argument is null.
    static void
    Triggers a SWT.ERROR_NULL_ARGUMENT exception if any argument is null.
    static void
    notNull(Object o1, Object o2, Object o3)
    Triggers a SWT.ERROR_NULL_ARGUMENT exception if any argument is null.
    static boolean
    sameClass(Object left, Object right)
    Returns whether the objects are of the same class.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Util

      public Util()
  • Method Details

    • sameClass

      public static boolean sameClass(Object left, Object right)
      Returns whether the objects are of the same class.
      Parameters:
      left - object to test
      right - object to test
      Returns:
      whether the objects are of the same class.
    • equal

      public static boolean equal(Object left, Object right)
      Returns whether the arguments are equal.
      Parameters:
      left - object to test
      right - object to test
      Returns:
      whether the arguments are equal.
    • equal

      public static boolean equal(double left, double right)
      Returns whether the arguments are equal.
      Parameters:
      left - double value to test
      right - double value to test
      Returns:
      whether the arguments are equal.
    • noNulls

      public static void noNulls(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(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(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(Object o1, 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(Object o1, Object o2, 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.