Here you can find the source of areEqual(final Object x, final Object y)
Parameter | Description |
---|---|
x | the first compared object. |
y | the second compared object. |
public static boolean areEqual(final Object x, final Object y)
//package com.java2s; //License from project: Open Source License public class Main { /**/* www. j a va 2 s . c o m*/ * Returns true if the given objects are equal, namely, they are both null or they are equal by the {@code equals()} method. * * @param x the first compared object. * @param y the second compared object. * * @return true if the given objects are equal. */ public static boolean areEqual(final Object x, final Object y) { return x == null ? y == null : x.equals(y); } }