comparison src/org/dancres/blitz/remote/perf/FakeUID.java @ 0:3dc0c5604566

Initial checkin of blitz 2.0 fcs - no installer yet.
author Dan Creswell <dan.creswell@gmail.com>
date Sat, 21 Mar 2009 11:00:06 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:3dc0c5604566
1 package org.dancres.blitz.remote.perf;
2
3 import org.dancres.blitz.lease.SpaceUID;
4
5 final class FakeUID implements SpaceUID {
6 private static long theFakeMagic = System.currentTimeMillis();
7 private static long theFakeId = System.currentTimeMillis();
8
9 private long theMagic = theFakeMagic;
10 private long theId = theFakeId;
11
12 FakeUID() {
13 }
14
15 public boolean equals(Object anObject) {
16 if (anObject instanceof FakeUID) {
17 FakeUID myUID = (FakeUID) anObject;
18
19 return ((theId == myUID.theId) && (theMagic == myUID.theMagic));
20 }
21
22 return false;
23 }
24
25 public int hashCode() {
26 return (int) ((theId >>> 32) ^ theId);
27 }
28
29 public String toString() {
30 return "FakeUID: " + theMagic + "->" + theId;
31 }
32 }