if (found) size--;
}
- public <B,C> void visit(Invokable<T,B,C> ivbc, B b, C c) {
- if (only!=null) ivbc.invoke(only, b, c);
+ public <B> void visit(Invokable<T,B> ivbc, B b) {
+ if (only!=null) ivbc.invoke(only, b);
else for(int j=0; j<size; j++)
- ivbc.invoke((T)array[j], b, c);
+ ivbc.invoke((T)array[j], b);
}
public int size() { return only==null ? size : 1; }
import java.lang.reflect.*;
import java.lang.ref.*;
-public interface Invokable<A,B,C> {
- public void invoke(A a, B b, C c);
+public interface Invokable<A,B> {
+ public void invoke(A a, B b);
}
private HashMap<K,Iterable<V>> cache = new HashMap<K,Iterable<V>>();
public Iterable<V> getAll(Topology<K> k) { return h.get(k); }
- public <B,C> void invoke(K k, Invokable<V,B,C> ivbc, B b, C c) {
+ public <B> void invoke(K k, Invokable<V,B> ivbc, B b) {
for(Topology<K> t : h.keySet())
if (t.contains(k))
for(V v : h.get(t))
- ivbc.invoke(v, b, c);
+ ivbc.invoke(v, b);
}
public Iterable<V> get(K k) {
return true;
return false;
}
- public <B,C> void invoke(K k, Invokable<V,B,C> ivbc, B b, C c) {
+ public <B> void invoke(K k, Invokable<V,B> ivbc, B b) {
int asint = f.invoke(k);
for(int i=0; i<size; i++) {
if (min[i] <= asint && max[i] >= asint) {
Object[] arr = v[i];
for(int j=0; j<arr.length; j++)
- ivbc.invoke((V)arr[j], b, c);
+ ivbc.invoke((V)arr[j], b);
}
}
}
public interface Visitable<V> {
- public <B,C> void visit(Invokable<V,B,C> ivbc, B b, C c);
+ public <B> void visit(Invokable<V,B> ivbc, B b);
}
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);
+ public <B> void invoke(K k, Invokable<V,B> ivbc, B b);
/** returns true iff this map contains some value <tt>v</tt> for key <tt>k</tt> */
public boolean contains(K k);