Functional interface
A functional interface is an interface with exactly one abstract operation, making it compatible with implementation by a function, lambda expression, or method reference.
Functional Design and Architecture: Examples in Haskell
A functional interface is an abstraction defining communication between subsystems through functional representations rather than object-oriented method dispatch.
- How it is used
- Separates subsystems so business logic can use services without knowing their concrete implementations.
- How deep it goes
- Defines abstract type-and-function boundaries, then develops Service Handles and free-monad interfaces with interpreters.
- Examples
- Uses hidden Device internals, SensorAPI and ControllerAPI records, greetings handles, and meteor reporting.
- What you can do after
- Apply it via Service Handles or free monads to isolate clients from replaceable subsystem implementations.
Read how Functional Design and Architecture: Examples in Haskell explains functional interface →
Kotlin in Action, 2E
A functional interface is an interface with exactly one abstract method, allowing it to be implemented by a function value or lambda in compatible contexts.
- How it is used
- Enables concise Kotlin callbacks for Java APIs and named Kotlin behavior contracts.
- How deep it goes
- Explains automatic and explicit SAM conversion, allocation effects of captures, and self-unregistering listener limits.
- Examples
- Uses button click listeners, Runnable postponement, reusable listeners, and an IntCondition predicate with helper methods.
- What you can do after
- Apply it via Kotlin lambdas and SAM constructors when calling or defining Java- and Kotlin-facing callback APIs.
Read how Kotlin in Action, 2E explains functional interface →
The Art of Code
A functional interface is a Java interface with one abstract method that can serve as the target type for a lambda expression or method reference.
- How it is used
- Represents small input-to-output behavior so Java can pass it through lambdas, method references, and functional pipelines.
- How deep it goes
- Defines the single-abstract-method rule, optional compiler enforcement, and standard alternatives, but stops short of broader interface mechanics.
- Examples
- Uses StringPredicate, LengthGreaterThanThree, Predicate, and a stream filtering words longer than three characters.
- What you can do after
- Apply Java lambdas to replace trivial implementation classes and express reusable transformations with matching functional-interface signatures.
Related concepts
- lambdaused by · A lambda is a language construct that defines an unnamed function or callable, often as a value.
- UserDetailsServiceincludes · UserDetailsService is a Spring Security interface for retrieving user-specific data required during authentication.
- transformer interfaceincludes · Transformer is a Spring Integration interface that defines a contract for components that convert messages or their payloads.
- atomic typeuses · An atomic type is a type whose supported accesses and operations are indivisible with respect to concurrent execution and provide defined synchronization semantics.
- algebraic data typeimplemented by · An algebraic data type is a composite type whose values are formed from product structures, finite alternatives, or both through type constructors.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


