Here you can find the source of objectsEqual(Object a, Object b)
@SuppressWarnings("all") static public boolean objectsEqual(Object a, Object b)
//package com.java2s; //License from project: Apache License public class Main { @SuppressWarnings("all") static public boolean objectsEqual(Object a, Object b) { if ((a == null) && (b == null)) { return true; }/*from w w w . jav a 2 s. c o m*/ if ((a == null) || (b == null)) { return false; } return a.toString().equals(b.toString()); } }