org.gitective.core
Class Check

java.lang.Object
  extended by org.gitective.core.Check

public abstract class Check
extends Object

Utility methods for various generic checks such as equality.


Constructor Summary
Check()
           
 
Method Summary
static boolean allNull(Object... objects)
          Check if the all given objects are null.
static boolean anyNull(Object... objects)
          Check if any of the given objects are null
static boolean equals(Object object1, Object object2)
          Check if the two given objects are either both null or both equal according the Object.equals(Object) method of object1.
static boolean equalsNonNull(Object object1, Object object2)
          Check if the two given objects are both non-null and equal according to the Object.equals(Object) method of object1.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Check

public Check()
Method Detail

equals

public static boolean equals(Object object1,
                             Object object2)
Check if the two given objects are either both null or both equal according the Object.equals(Object) method of object1.

Parameters:
object1 -
object2 -
Returns:
true if equal, false otherwise

allNull

public static boolean allNull(Object... objects)
Check if the all given objects are null.

Parameters:
objects -
Returns:
true if both are null, false otherwise

anyNull

public static boolean anyNull(Object... objects)
Check if any of the given objects are null

Parameters:
objects -
Returns:
true if any object is null, false otherwise

equalsNonNull

public static boolean equalsNonNull(Object object1,
                                    Object object2)
Check if the two given objects are both non-null and equal according to the Object.equals(Object) method of object1.

Parameters:
object1 -
object2 -
Returns:
true if non-null and equal, false otherwise


Copyright © 2011-2012. All Rights Reserved.