objectutils.java
来自「纯java操作系统jnode,安装简单和操作简单的个人使用的Java操作系统」· Java 代码 · 共 28 行
JAVA
28 行
/*
* $Id: ObjectUtils.java,v 1.1 2003/11/25 11:41:47 epr Exp $
*/
package org.jnode.util;
/**
* @author Ewout Prangsma (epr@users.sourceforge.net)
*/
public class ObjectUtils {
/**
* Compare the two objects and return true if they are equal, false otherwise.
* If one of the object is null and the other is not, false is returned.
* @param a Can be null
* @param b Can be null
* @return True if (a == b) || a.equals(b)
*/
public static boolean equals(Object a, Object b) {
if (a == b) {
return true;
} else if ((a != null) && (b != null)) {
return a.equals(b);
} else {
return false;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?