KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > ejb > common > IdentityEntry


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.ejb.common;
13
14 /**
15  * Entry that does '==' equality testing. This entity also includeds 'nextEntry' that
16  * allows it to be used as a linked list to track the insert order.
17  */

18 public class IdentityEntry extends EntrySet.Entry {
19     public IdentityEntry nextEntry;
20     public Object JavaDoc value;
21
22     public IdentityEntry(Object JavaDoc key) {
23         super(key);
24     }
25
26     public boolean equals(Object JavaDoc o) {
27         if (!(o instanceof IdentityEntry)) {
28             return false;
29         }
30         return (getKey() == ((EntrySet.Entry)o).getKey());
31     }
32
33 }
34
Popular Tags