The document discusses functional programming concepts in Java including streams, optional, high order functions like predicate and supplier. It covers designing for functional programming through principles like immutable data and lazy evaluation. Examples show imperative vs declarative styles and how to use method references and custom functional interfaces. Common use cases like error handling and multi-dimensional data are demonstrated. Finally, antipatterns of functional programming are mentioned.
High Order Function
Javadoc
Function<T, R>
Represents a function that accepts one argument and produces a result
Predicate<T>
Represents a predicate (boolean-valued function) of one argument
Consumer<T>
Represents an operation that accepts a single input argument and returns no result
Supplier<T>
Represents a supplier of results
...
...
High Order Function
Javadoc
Function<T, R>
Represents a function that accepts one argument and produces a result
Predicate<T>
Represents a predicate (boolean-valued function) of one argument
Consumer<T>
Represents an operation that accepts a single input argument and returns no result
Supplier<T>
Represents a supplier of results
...
...
High Order Function
Javadoc
Function<T, R>
Represents a function that accepts one argument and produces a result
Predicate<T>
Represents a predicate (boolean-valued function) of one argument
Consumer<T>
Represents an operation that accepts a single input argument and returns no result
Supplier<T>
Represents a supplier of results
...
...
High Order Function
Javadoc
Function<T, R>
Represents a function that accepts one argument and produces a result
Predicate<T>
Represents a predicate (boolean-valued function) of one argument
Consumer<T>
Represents an operation that accepts a single input argument and returns no result
Supplier<T>
Represents a supplier of results
...
...
High Order Function
Javadoc
Function<T, R>
Represents a function that accepts one argument and produces a result
Predicate<T>
Represents a predicate (boolean-valued function) of one argument
Consumer<T>
Represents an operation that accepts a single input argument and returns no result
Supplier<T>
Represents a supplier of results
...
...
High Order Function
Javadoc
Function<T, R>
Represents a function that accepts one argument and produces a result
Predicate<T>
Represents a predicate (boolean-valued function) of one argument
Consumer<T>
Represents an operation that accepts a single input argument and returns no result
Supplier<T>
Represents a supplier of results
...
...
High Order Function
Javadoc
Function<T, R>
Represents a function that accepts one argument and produces a result
Predicate<T>
Represents a predicate (boolean-valued function) of one argument
Consumer<T>
Represents an operation that accepts a single input argument and returns no result
Supplier<T>
Represents a supplier of results
...
...
High Order Function
Javadoc
Function<T, R>
Represents a function that accepts one argument and produces a result
Predicate<T>
Represents a predicate (boolean-valued function) of one argument
Consumer<T>
Represents an operation that accepts a single input argument and returns no result
Supplier<T>
Represents a supplier of results
...
...
The simplest one
Use as Executor
The simplest one
Use as Executor
The simplest one
Use as Executor
The simplest one
Use as Executor
The simplest one
Use as Executor
The simplest one
Use as Executor
The simplest one
Use as Executor
The simplest one
Use as Executor
Making next step in FP
Making next step in FP
diffplug/durian
diffplug/durian
diffplug/durian
diffplug/durian
diffplug/durian
diffplug/durian
jOOQ/jOOL
jOOQ/jOOL
Early Optimization (Streams, or Parallel Streams)
Need to embrace, move java 9,10,11
Look at reactive