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
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
14 * @author Toni Kalajainen
\r
16 package org.simantics.utils.datastructures.cache;
\r
18 import java.util.Hashtable;
\r
19 import java.util.Map;
\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
25 * All values must be explicitly provided and removed.
\r
29 public class Registry<K, V> extends Hashtable<K, V> implements IMapProvider<K, V>, Map<K, V> {
\r
31 private static final long serialVersionUID = 8509496982057736486L;
\r
37 public Registry(int initialCapacity, float loadFactor) {
\r
38 super(initialCapacity, loadFactor);
\r
41 public Registry(int initialCapacity) {
\r
42 super(initialCapacity);
\r
45 public Registry(Map<? extends K, ? extends V> t) {
\r