com.norconex.commons.lang
Class EqualsUtil

java.lang.Object
  extended by com.norconex.commons.lang.EqualsUtil

public final class EqualsUtil
extends Object

Convenience methods related to object equality.

Author:
Pascal Essiembre

Method Summary
static boolean equalsAll(Object source, Object... targets)
          Whether a source object equals ALL of the target objects
static boolean equalsAny(Object source, Object... targets)
          Whether a source object equals ANY of the target objects
static boolean equalsNone(Object source, Object... targets)
          Whether a source object equals NONE of the target objects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

equalsAny

public static boolean equalsAny(Object source,
                                Object... targets)
Whether a source object equals ANY of the target objects

Parameters:
source - object being tested for equality with targets
targets - one or more objects to be tested with source for equality
Returns:
true if any of the target objects is equal

equalsAll

public static boolean equalsAll(Object source,
                                Object... targets)
Whether a source object equals ALL of the target objects

Parameters:
source - object being tested for equality with targets
targets - one or more objects to be tested with source for equality
Returns:
true if all of the target objects is equal

equalsNone

public static boolean equalsNone(Object source,
                                 Object... targets)
Whether a source object equals NONE of the target objects

Parameters:
source - object being tested for equality with targets
targets - one or more objects to be tested with source for equality
Returns:
true if none of the target objects is equal


Copyright © 2008-2013 Norconex Inc.. All Rights Reserved.