java 词法分析器,用于一般的C,C++,VB,PS/SQL 语句的翻译

源代码在线查看: equals.java

软件大小: 1080 K
上传用户: ac3698
关键词: java SQL VB PS
下载地址: 免注册下载 普通下载 VIP

相关代码

				package fri.util;
				
				/**
				 * Object utility. Equality and hash code for objects that may be null.
					
				  @author Ritzberger Fritz
				*/
				
				public abstract class Equals
				{
					/**
					 * Returns false if objects are not equal or one of them is null and the other not.
					 */
					public static boolean equals(Object o1, Object o2)	{
						return o1 == o2 ? true : o1 == null || o2 == null ? false : o1.equals(o2);
					}	// null == null is true in Java
				
					/**
					 * Returns zero for a null object, else the objects hash code.
					 */
					public static int hashCode(Object o)	{
						return o == null ? 0 : o.hashCode();
					}
				
					private Equals()	{}
					
				}			

相关资源