1 /******************************************************************************* 2 * Copyright (c) 2000, 2005 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 package org.eclipse.core.internal.dtree; 12 13 /** 14 * An interface for comparing two data tree objects. Provides information 15 * on how an object has changed from one tree to another. 16 */ 17 public interface IComparator { 18 /** 19 * Returns an integer describing the changes between two data objects 20 * in a data tree. The first three bits of the returned integer are 21 * used during calculation of delta trees. The remaining bits can be 22 * assigned any meaning that is useful to the client. If there is no 23 * change in the two data objects, this method must return 0. 24 * 25 * @see NodeComparison 26 */ 27 int compare(Object o1, Object o2); 28 } 29