1 24 25 package org.objectweb.clif.storage.lib.filestorage; 26 27 import org.objectweb.clif.storage.api.CollectKey; 28 import java.math.BigInteger ; 29 30 34 public class FileStorageCollectKey implements CollectKey 35 { 36 static protected BigInteger nextKey = BigInteger.ZERO; 37 38 protected BigInteger value; 39 40 41 public FileStorageCollectKey() 42 { 43 value = nextKey; 44 nextKey = nextKey.add(BigInteger.ONE); 45 } 46 47 48 public boolean equals(Object obj) 49 { 50 if (obj instanceof FileStorageCollectKey) 51 { 52 return ((FileStorageCollectKey)obj).value.equals(value); 53 } 54 else 55 { 56 return false; 57 } 58 } 59 60 61 public int hashCode() 62 { 63 return value.hashCode(); 64 } 65 } 66 | Popular Tags |