1 23 24 package com.sun.ejb.containers.util.cache; 25 26 public class CacheEntry { 27 28 public Object key; 29 public Object value; 30 public int keyHashCode; 31 public CacheEntry next; 32 33 public CacheEntry before; 34 public CacheEntry after; 35 36 39 public CacheEntry(Object k, Object v, CacheEntry n) { 40 key = k; 41 keyHashCode = k.hashCode(); 42 value = v; 43 next = n; 44 } 45 46 public CacheEntry(Object k, int kh, Object v, CacheEntry n) { 47 key = k; 48 keyHashCode = kh; 49 value = v; 50 next = n; 51 } 52 53 public CacheEntry initialize(Object k, Object v, CacheEntry n) { 54 key = k; 55 keyHashCode = k.hashCode(); 56 value = v; 57 next = n; 58 59 return this; 60 } 61 62 public CacheEntry initialize(Object k, int kh, Object v, CacheEntry n) { 63 key = k; 64 keyHashCode = kh; 65 value = v; 66 next = n; 67 68 return this; 69 70 } 71 72 public int hashCode() { 73 return keyHashCode; 74 } 75 76 public String toString() { 77 return key + "=" + value; 78 } 79 80 } 81 82 83 | Popular Tags |