该注释出自:java.util.concurrent 包的 CompletionStage<t>接口,里面的 applyToEither 方法。</t>
/**
Returns a new CompletionStage that, when either this or the
other given stage complete normally, is executed with the
corresponding result as argument to the supplied function.
**/
意思是 “ 返回一个新的 CompletionStage,当此 Stage 或另一个给定 Stage 正常完成时,将使用相应的结果作为所提供函数的参数来执行。 ”
这种注释写法似乎挺常见的。但弱鸡英语乏力,看见这么长的句子就头疼。
好不容易看完,几个小句还得翻来覆去猜它们一起到底代表个什么意思。
如果能明白这些个从句到底修饰的是什么鬼,有套模板,以后看代码就不用那么吃力了。