1 /******************************************************************************* 2 * Copyright (c) 2006 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 ******************************************************************************/ 11 12 package org.eclipse.core.internal.databinding; 13 14 /** 15 * @since 3.3 16 * 17 */ 18 public class Util { 19 20 /** 21 * Checks whether the two objects are <code>null</code> -- allowing for 22 * <code>null</code>. 23 * 24 * @param left 25 * The left object to compare; may be <code>null</code>. 26 * @param right 27 * The right object to compare; may be <code>null</code>. 28 * @return <code>true</code> if the two objects are equivalent; 29 * <code>false</code> otherwise. 30 */ 31 public static final boolean equals(final Object left, final Object right) { 32 return left == null ? right == null : ((right != null) && left 33 .equals(right)); 34 } 35 } 36