optimizations to IntPairMap.java
[sbp.git] / src / edu / berkeley / sbp / util / VisitableMap.java
index ab41a81..c5f1a56 100644 (file)
@@ -1,7 +1,16 @@
+// Copyright 2006-2007 all rights reserved; see LICENSE file for BSD-style license
+
 package edu.berkeley.sbp.util;
 import java.util.*;
+import java.io.*;
+
+/** a Map that knows how to apply an Invokable to all its elements */
+public interface VisitableMap<K,V> extends Serializable {
 
-public interface VisitableMap<K,V> {
+    /** invokes <tt>ivbc</tt> on each element of this map, passing constant arguments <tt>b</tt> and <tt>c</tt> */
     public <B,C> void invoke(K k, Invokable<V,B,C> ivbc, B b, C c);
+
+    /** returns true iff this map contains some value <tt>v</tt> for key <tt>k</tt> */
     public boolean contains(K k);
+
 }