summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/utils
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2013-02-28 16:06:40 +0100
committerAndrew Branson <andrew.branson@cern.ch>2013-02-28 16:06:40 +0100
commit288f3c6045d8f6b1e4d9b0b02a99d76f3d3683e1 (patch)
treeea29d4eb429eeca7611c1dd0e30e4ab9649bd81e /src/main/java/com/c2kernel/utils
parentba1d538b588dc57066213a94803584ea9016e1e7 (diff)
RemoveNonStrongRefCache, as it didn't add anything to Map.
Diffstat (limited to 'src/main/java/com/c2kernel/utils')
-rw-r--r--src/main/java/com/c2kernel/utils/NonStrongRefCache.java42
-rw-r--r--src/main/java/com/c2kernel/utils/SoftCache.java2
-rw-r--r--src/main/java/com/c2kernel/utils/WeakCache.java2
3 files changed, 2 insertions, 44 deletions
diff --git a/src/main/java/com/c2kernel/utils/NonStrongRefCache.java b/src/main/java/com/c2kernel/utils/NonStrongRefCache.java
deleted file mode 100644
index bcd576e..0000000
--- a/src/main/java/com/c2kernel/utils/NonStrongRefCache.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * NonStrongRefCache.java
- *
- * Copyright (c) 2012, The CRISTAL Consortium. All rights reserved.
- *
- * CRISTAL kernel is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see:
- * http://www.gnu.org/licenses/
- */
-
-package com.c2kernel.utils;
-
-import java.util.Map;
-import java.util.Set;
-
-public interface NonStrongRefCache<K, V> {
-
- public abstract V get(Object key);
-
- public abstract V put(K key, V value);
-
- public abstract V remove(Object key);
-
- public abstract void clear();
-
- public abstract int size();
-
- public abstract Set<K> keySet();
-
- public abstract Set<Map.Entry<K, V>> entrySet();
-
-} \ No newline at end of file
diff --git a/src/main/java/com/c2kernel/utils/SoftCache.java b/src/main/java/com/c2kernel/utils/SoftCache.java
index da58c87..2fd79f1 100644
--- a/src/main/java/com/c2kernel/utils/SoftCache.java
+++ b/src/main/java/com/c2kernel/utils/SoftCache.java
@@ -14,7 +14,7 @@ import java.util.Set;
*
* $Revision: 1.5 $ $Date: 2004/10/29 13:29:09 $
******************************************************************************/
-public class SoftCache<K, V> extends AbstractMap<K, V> implements NonStrongRefCache<K, V> {
+public class SoftCache<K, V> extends AbstractMap<K, V> {
private final Map<K, SoftValue<V>> hash = new HashMap<K, SoftValue<V>>();
private final int minSize;
diff --git a/src/main/java/com/c2kernel/utils/WeakCache.java b/src/main/java/com/c2kernel/utils/WeakCache.java
index e7ec105..899852e 100644
--- a/src/main/java/com/c2kernel/utils/WeakCache.java
+++ b/src/main/java/com/c2kernel/utils/WeakCache.java
@@ -14,7 +14,7 @@ import java.util.Set;
*
* $Revision: 1.5 $ $Date: 2004/10/29 13:29:09 $
******************************************************************************/
-public class WeakCache<K, V> extends AbstractMap<K, V> implements NonStrongRefCache<K, V> {
+public class WeakCache<K, V> extends AbstractMap<K, V> {
private final Map<K, WeakValue<V>> hash = new HashMap<K, WeakValue<V>>();
private final int minSize;