Supplier interface¶
The Supplier\<T> interface is a predefined Functional Interface within the Java 8 lambda architecture, representing a specific category of function objects.^[600-developer__java__java8__java8-lambda.md]
Functional Signature¶
Technically, the Supplier<T> is characterized as a nilary function to R.^[600-developer__java__java8__java8-lambda.md] In functional programming terms, this indicates that it accepts no arguments (nilary) and returns a result of type R (or T).^[600-developer__java__java8__java8-lambda.md]
This distinguishes it from other functional interfaces in the same package which accept arguments: * [[Function\<T,R>]]: Unary function from T to R^[600-developer__java__java8__java8-lambda.md] * [[Consumer\<T>]]: Unary function from T to void^[600-developer__java__java8__java8-lambda.md] * [[Predicate\<T>]]: Unary function from T to boolean^[600-developer__java__java8__java8-lambda.md]
Sources¶
600-developer__java__java8__java8-lambda.md