net.lessy.util
Class ObjectUtil

java.lang.Object
  extended by net.lessy.util.ObjectUtil

public class ObjectUtil
extends Object

Utilities around Objects

Author:
Hans Lesmeister

Constructor Summary
ObjectUtil()
           
 
Method Summary
static boolean secureEquals(Object a, Object b)
          Compares 2 Objects on equality, but with null-safety
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectUtil

public ObjectUtil()
Method Detail

secureEquals

public static final boolean secureEquals(Object a,
                                         Object b)
Compares 2 Objects on equality, but with null-safety

Parameters:
a - 1. Object (can be null)
b - 2. Object (can be null)
Returns:
if both object are null then true, else a normal equals is performed (of course on a non-null object)


Copyright © 2012. All Rights Reserved.