我有一个用java 8编写的代码,使用completablefuture和handle方法:
public interface Move
{
CompletableFuture<Boolean> move(float i);
}
然后创建move的示例mover并调用:
mover.move(i).handle(new BiFunction<Boolean, Throwable, Object>()
{
public Object apply(Boolean b, Throwable err)
{
return something; //Didn't want to overwhelm the code here; in the original one a method is called
}
}
如何使它与java7向后兼容?或者我该如何处理这个问题?
暂无答案!
目前还没有任何答案,快来回答吧!