org.owasp.esapi.util
Class NullSafe
java.lang.Object
org.owasp.esapi.util.NullSafe
public class NullSafe
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
equals
public static boolean equals(Object a,
Object b)
Object.equals(Object)
that safely handles nulls.
- Parameters:
a
- First objectb
- Second object
- Returns:
- true if a == b or a.equals(b). false otherwise.
hashCode
public static int hashCode(Object o)
Object.hashCode()
of an object.
- Parameters:
o
- Object to get a hashCode for.
- Returns:
- 0 if o is null. Otherwise o.hashCode().
toString
public static String toString(Object o)
Object.toString()
of an object.
- Parameters:
o
- Object to get a String for.
- Returns:
- "(null)" o is null. Otherwise o.toString().
Copyright © 2013 The Open Web Application Security Project (OWASP). All Rights Reserved.