Here you can find the source of areEqual(boolean aThis, boolean aThat)
static boolean areEqual(boolean aThis, boolean aThat)
//package com.java2s; //License from project: Apache License public class Main { /** Equals for <tt>boolean</tt> fields. */ static boolean areEqual(boolean aThis, boolean aThat) { return aThis == aThat; }//from w w w . j a v a 2 s . com /** Equals for <tt>char</tt> fields. */ static boolean areEqual(char aThis, char aThat) { return aThis == aThat; } /** Equals for <tt>long</tt> fields. <P>Note that <tt>byte</tt>, <tt>short</tt>, and <tt>int</tt> are handled by this method, through implicit conversion. */ static boolean areEqual(long aThis, long aThat) { return aThis == aThat; } /** Equals for <tt>float</tt> fields. */ static boolean areEqual(float aThis, float aThat) { return Float.floatToIntBits(aThis) == Float.floatToIntBits(aThat); } /** Equals for <tt>double</tt> fields. */ static boolean areEqual(double aThis, double aThat) { return Double.doubleToLongBits(aThis) == Double.doubleToLongBits(aThat); } /** Equals for possibly-<tt>null</tt> object field. <P><em>Does not include arrays</em>. (This restriction will likely be removed in a future version.) */ static boolean areEqual(Object aThis, Object aThat) { if (isArray(aThis) || isArray(aThat)) { throw new IllegalArgumentException("This method does not currently support arrays."); } return aThis == null ? aThat == null : aThis.equals(aThat); } private static boolean isArray(Object aObject) { return aObject != null && aObject.getClass().isArray(); } }