I want to create an anonymous inner class that extends another class.
What I want to do is actually something like the following:
for(final e:list){
Callable<V> l = new MyCallable(e.v) extends Callable<V>(){
private e;//updated by constructor
@Override
public V call() throws Exception {
if(e != null) return e;
else{
//do something heavy
}
}
};
FutureTask<V> f = new FutureTask<V>(l);
futureLoadingtask.run();
}
}
Is this possible?
See Question&Answers more detail:os