我想在CommonInterface中实现一个泛型方法,用不同的参数和返回类型来实现它。因此,我有: public <T, N> T call(N n);如果我能很好地理解一般逻辑(也许不是..)call方法返回类型T并作为参数接收类型String s = someService.doSome(id); // suppose doSome receive an Integer as param}
DoSome方法
我想在一个类中实现遍历逻辑,这个类将得到必须作为它提供的方法的输入参数应用的操作。through the graph and apply the input function (specified somewhere else) on the passed nodes
}
Java提供了将方法作为输入参数传递的可能性吗?