接口 Callback<P,R>
- 类型参数:
P- The type of the argument provided to thecallmethod.R- The type of the return type of thecallmethod.
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
The Callback interface is designed to allow for a common, reusable interface
to exist for defining APIs that requires a call back in certain situations.
Callback is defined with two generic parameters: the first parameter
specifies the type of the object passed in to the call method,
with the second parameter specifying the return type of the method.
- 从以下版本开始:
- JavaFX 2.0
- 作者:
- java
-
方法概要
-
方法详细资料
-
call
Thecallmethod is called when required, and is given a single argument of type P, with a requirement that an object of type R is returned.- 参数:
param- The single argument upon which the returned value should be determined.- 返回:
- An object of type R that may be determined based on the provided parameter value.
-