]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
SingletonRead base class 92/492/1
authorAntti Villberg <antti.villberg@semantum.fi>
Sun, 7 May 2017 06:49:13 +0000 (09:49 +0300)
committerAntti Villberg <antti.villberg@semantum.fi>
Sun, 7 May 2017 06:49:13 +0000 (09:49 +0300)
refs #7196

Change-Id: Ib7751212d5cad181c74a1680962e4c84a43e4ebb

bundles/org.simantics.db.common/src/org/simantics/db/common/request/SingletonRead.java [new file with mode: 0644]

diff --git a/bundles/org.simantics.db.common/src/org/simantics/db/common/request/SingletonRead.java b/bundles/org.simantics.db.common/src/org/simantics/db/common/request/SingletonRead.java
new file mode 100644 (file)
index 0000000..b24e856
--- /dev/null
@@ -0,0 +1,16 @@
+package org.simantics.db.common.request;
+
+public abstract class SingletonRead<R> extends GenericReadBase2<R> {
+
+       @Override
+       public boolean equals(Object arg0) {
+               if(arg0 == this) return true;
+               return getClass().equals(arg0.getClass());
+       }
+       
+       @Override
+       public int hashCode() {
+               return getClass().hashCode();
+       }
+       
+}