]> gerrit.simantics Code Review - simantics/platform.git/blob - 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
1 /*******************************************************************************\r
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
3  * in Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 /*\r
13  *\r
14  * @author Toni Kalajainen\r
15  */\r
16 package org.simantics.utils.datastructures.cache;\r
17 \r
18 import java.util.Hashtable;\r
19 import java.util.Map;\r
20 \r
21 /**\r
22  * Registry is a value store where values are pre-registered and not \r
23  * requested on-demand as with strong and weak caches.\r
24  * \r
25  * All values must be explicitly provided and removed.\r
26  * \r
27  *\r
28  */\r
29 public class Registry<K, V> extends Hashtable<K, V> implements IMapProvider<K, V>, Map<K, V> {\r
30 \r
31         private static final long serialVersionUID = 8509496982057736486L;\r
32 \r
33         public Registry() {\r
34                 super();\r
35         }\r
36 \r
37         public Registry(int initialCapacity, float loadFactor) {\r
38                 super(initialCapacity, loadFactor);\r
39         }\r
40 \r
41         public Registry(int initialCapacity) {\r
42                 super(initialCapacity);\r
43         }\r
44 \r
45         public Registry(Map<? extends K, ? extends V> t) {\r
46                 super(t);\r
47         }\r
48         \r
49 }\r