문제

In the Reactor code I could see something like

/**
 * 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);
}

What is this 'of' keyword?

도움이 되었습니까?

해결책

What you are seeing is not a new of keyword. It is actually the name of the method, even though it may not seem like it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top