|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.greenpineyu.fel.common.ObjectUtils
public class ObjectUtils
| 构造方法摘要 | |
|---|---|
ObjectUtils()
|
|
| 方法摘要 | |
|---|---|
static boolean |
equals(Object object1,
Object object2)
Compares two objects for equality, where either one or both objects may be null. |
static boolean |
notEqual(Object object1,
Object object2)
Compares two objects for inequality, where either one or both objects may be null. |
static String |
toString(Object obj)
Gets the toString of an Object returning
an empty string ("") if null input. |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public ObjectUtils()
| 方法详细信息 |
|---|
public static boolean equals(Object object1,
Object object2)
Compares two objects for equality, where either one or both
objects may be null.
ObjectUtils.equals(null, null) = true
ObjectUtils.equals(null, "") = false
ObjectUtils.equals("", null) = false
ObjectUtils.equals("", "") = true
ObjectUtils.equals(Boolean.TRUE, null) = false
ObjectUtils.equals(Boolean.TRUE, "true") = false
ObjectUtils.equals(Boolean.TRUE, Boolean.TRUE) = true
ObjectUtils.equals(Boolean.TRUE, Boolean.FALSE) = false
object1 - the first object, may be nullobject2 - the second object, may be null
true if the values of both objects are the samepublic static String toString(Object obj)
Gets the toString of an Object returning
an empty string ("") if null input.
ObjectUtils.toString(null) = ""
ObjectUtils.toString("") = ""
ObjectUtils.toString("bat") = "bat"
ObjectUtils.toString(Boolean.TRUE) = "true"
obj - the Object to toString, may be null
null inputStringUtils#defaultString(String),
String.valueOf(Object)
public static boolean notEqual(Object object1,
Object object2)
Compares two objects for inequality, where either one or both
objects may be null.
ObjectUtils.notEqual(null, null) = false
ObjectUtils.notEqual(null, "") = true
ObjectUtils.notEqual("", null) = true
ObjectUtils.notEqual("", "") = false
ObjectUtils.notEqual(Boolean.TRUE, null) = true
ObjectUtils.notEqual(Boolean.TRUE, "true") = true
ObjectUtils.notEqual(Boolean.TRUE, Boolean.TRUE) = false
ObjectUtils.notEqual(Boolean.TRUE, Boolean.FALSE) = true
object1 - the first object, may be nullobject2 - the second object, may be null
false if the values of both objects are the same
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||