[Swift-commit] r2118 - trunk/src/org/griphyn/vdl/karajan/lib/cache

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Tue Jul 15 16:50:19 CDT 2008


Author: hategan
Date: 2008-07-15 16:50:19 -0500 (Tue, 15 Jul 2008)
New Revision: 2118

Added:
   trunk/src/org/griphyn/vdl/karajan/lib/cache/CacheMapAdapter.java
Log:
added a cache to java.util.Map adapter

Added: trunk/src/org/griphyn/vdl/karajan/lib/cache/CacheMapAdapter.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/cache/CacheMapAdapter.java	                        (rev 0)
+++ trunk/src/org/griphyn/vdl/karajan/lib/cache/CacheMapAdapter.java	2008-07-15 21:50:19 UTC (rev 2118)
@@ -0,0 +1,64 @@
+/*
+ * Created on Jul 15, 2008
+ */
+package org.griphyn.vdl.karajan.lib.cache;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+
+public class CacheMapAdapter implements Map {
+	private VDLFileCache cache;
+	
+	public CacheMapAdapter(VDLFileCache cache) {
+		this.cache = cache;
+	}
+
+	public void clear() {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean containsKey(Object key) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean containsValue(Object value) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Set entrySet() {
+		throw new UnsupportedOperationException();
+	}
+
+	public Object get(Object key) {
+		return cache.getPaths(key);
+	}
+
+	public boolean isEmpty() {
+		throw new UnsupportedOperationException();
+	}
+
+	public Set keySet() {
+		throw new UnsupportedOperationException();
+	}
+
+	public Object put(Object key, Object value) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void putAll(Map t) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Object remove(Object key) {
+		throw new UnsupportedOperationException();
+	}
+
+	public int size() {
+		throw new UnsupportedOperationException();
+	}
+
+	public Collection values() {
+		throw new UnsupportedOperationException();
+	}
+}




More information about the Swift-commit mailing list