]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.utils.datastructures/src/org/simantics/utils/datastructures/cache/Registry.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.utils.datastructures / src / org / simantics / utils / datastructures / cache / Registry.java
diff --git a/bundles/org.simantics.utils.datastructures/src/org/simantics/utils/datastructures/cache/Registry.java b/bundles/org.simantics.utils.datastructures/src/org/simantics/utils/datastructures/cache/Registry.java
new file mode 100644 (file)
index 0000000..ec3b7d4
--- /dev/null
@@ -0,0 +1,49 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
+ * in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+/*\r
+ *\r
+ * @author Toni Kalajainen\r
+ */\r
+package org.simantics.utils.datastructures.cache;\r
+\r
+import java.util.Hashtable;\r
+import java.util.Map;\r
+\r
+/**\r
+ * Registry is a value store where values are pre-registered and not \r
+ * requested on-demand as with strong and weak caches.\r
+ * \r
+ * All values must be explicitly provided and removed.\r
+ * \r
+ *\r
+ */\r
+public class Registry<K, V> extends Hashtable<K, V> implements IMapProvider<K, V>, Map<K, V> {\r
+\r
+       private static final long serialVersionUID = 8509496982057736486L;\r
+\r
+       public Registry() {\r
+               super();\r
+       }\r
+\r
+       public Registry(int initialCapacity, float loadFactor) {\r
+               super(initialCapacity, loadFactor);\r
+       }\r
+\r
+       public Registry(int initialCapacity) {\r
+               super(initialCapacity);\r
+       }\r
+\r
+       public Registry(Map<? extends K, ? extends V> t) {\r
+               super(t);\r
+       }\r
+       \r
+}\r