【发布时间】:2013-12-27 01:15:21
【问题描述】:
在反应堆代码中,我可以看到类似的东西
/**
* Create a {@link Tuple1} with the given object.
*
* @param t1 The first value in the tuple.
* @param <T1> The type of the first value.
* @return The new {@link Tuple1}.
*/
public static <T1> Tuple1<T1> of(T1 t1) {
return new Tuple1<T1>(t1);
}
这个'of'关键字是什么?
【问题讨论】:
-
这是方法的名称。
-
@SotiriosDelimanolis 我喜欢答案像这样递归:))))))))))))))))
-
该死!你说的对!我只是忽略了,想知道这是什么“的”。谢谢
-
草率的命名约定
-
@user2310289 呵呵,我觉得有点用(虽然我承认,这两个不一定是互斥的)。