From 6c4c2674cf765832225fa7964650c39a983efd22 Mon Sep 17 00:00:00 2001 From: jzhou Date: Mon, 19 May 2008 22:46:49 +0000 Subject: [PATCH] forgot to upload a new file for Scheduling Simulator --- .../src/Analysis/Scheduling/ObjectInfo.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Robust/src/Analysis/Scheduling/ObjectInfo.java diff --git a/Robust/src/Analysis/Scheduling/ObjectInfo.java b/Robust/src/Analysis/Scheduling/ObjectInfo.java new file mode 100644 index 00000000..d4a4a2ca --- /dev/null +++ b/Robust/src/Analysis/Scheduling/ObjectInfo.java @@ -0,0 +1,32 @@ +package Analysis.Scheduling; + +import Analysis.TaskStateAnalysis.FlagState; + +public class ObjectInfo { + public ObjectSimulator obj; + public FlagState fs; + public int version; + + public ObjectInfo(ObjectSimulator obj) { + this.obj = obj; + this.fs = obj.getCurrentFS(); + this.version = obj.getVersion(); + } + + public boolean equals(Object o) { + if (o instanceof ObjectInfo) { + ObjectInfo oi=(ObjectInfo)o; + if ((oi.obj != obj) || + (oi.fs != fs) || + (oi.version != version)) { + return false; + } + return true; + } + return false; + } + + public int hashCode() { + return obj.hashCode()^fs.hashCode()^version; + } +} \ No newline at end of file -- 2.34.1