Here you can find the source of objectsEqual(final Object objectA, final Object objectB)
Parameter | Description |
---|---|
objectA | one of the objects to be compared |
objectB | one of the objects to be compared |
public static boolean objectsEqual(final Object objectA, final Object objectB)
//package com.java2s; /*/*from w w w.java 2 s . c o m*/ * Debrief - the Open Source Maritime Analysis Application * http://debrief.info * * (C) 2000-2014, PlanetMayo Ltd * * This library is free software; you can redistribute it and/or * modify it under the terms of the Eclipse Public License v1.0 * (http://www.eclipse.org/legal/epl-v10.html) * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ public class Main { /** * Compares two objects passed in for equality. * Handle null objects. * @param objectA one of the objects to be compared * @param objectB one of the objects to be compared */ public static boolean objectsEqual(final Object objectA, final Object objectB) { if (objectA == null) return (objectB == null); return objectA.equals(objectB); } }