Pass an object to DoSomething and you get the same thing as the closure.
DoSomething(func() { ... })
becomes DoSomething(new Runnable() {
public void run() { ... }
});
or the longer form class MyAction implements Runnable {
public void run() { ... }
}
DoSomething(new MyAction());