add a second parameter argument to Invokable (two params now)
[sbp.git] / src / edu / berkeley / sbp / util / VisitableMap.java
1 // Copyright 2006-2007 all rights reserved; see LICENSE file for BSD-style license
2
3 package edu.berkeley.sbp.util;
4 import java.util.*;
5 import java.io.*;
6
7 /** a Map that knows how to apply an Invokable to all its elements */
8 public interface VisitableMap<K,V> extends Serializable {
9
10     /** invokes <tt>ivbc</tt> on each element of this map, passing constant arguments <tt>b</tt> and <tt>c</tt> */
11     public <B,C> void invoke(K k, Invokable<V,B,C> ivbc, B b, C c);
12
13     /** returns true iff this map contains some value <tt>v</tt> for key <tt>k</tt> */
14     public boolean contains(K k);
15
16 }