KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > texteditor > quickdiff > compare > equivalence > Hash


1 /*******************************************************************************
2  * Copyright (c) 2005, 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 package org.eclipse.ui.internal.texteditor.quickdiff.compare.equivalence;
12
13 /**
14  * Value objects. Subclasses must override <code>equals</code> and are
15  * typically <code>final</code>.
16  *
17  * @since 3.2
18  */

19 public abstract class Hash implements Cloneable JavaDoc {
20     
21     public Object JavaDoc clone() {
22         try {
23             return super.clone();
24         } catch (CloneNotSupportedException JavaDoc x) {
25             throw new AssertionError JavaDoc(x);
26         }
27     }
28     
29     /**
30      * Returns <code>true</code> if the two hashes are equal,
31      * <code>false</code> if not. Subclasses must override.
32      *
33      * @param obj {@inheritDoc}
34      * @return <code>true</code> if the receiver is equal to <code>obj</code>
35      */

36     public abstract boolean equals(Object JavaDoc obj);
37
38 }
Popular Tags