[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/hellokaton/learn-java8/master/java8-lambda/README.md [Back]  [Original]

# lambda ## ****(how)(what) ****(what)(how) ## **** Java ## ## lambda * * LambdaLambda * Lambda * ## Lambda ## Lambda Lambda ## Java 8 | | | | |:-----:|:--------|:-------| | `Predicate` | `T->boolean` | `IntPredicate,LongPredicate, DoublePredicate` | | `Consumer` | `T->void` | `IntConsumer,LongConsumer, DoubleConsumer` | | `Function` | `T->R` | `IntFunction, IntToDoubleFunction,`
`IntToLongFunction, LongFunction,`
`LongToDoubleFunction, LongToIntFunction, `
`DoubleFunction, ToIntFunction, `
`ToDoubleFunction, ToLongFunction` | | `Supplier` | `()->T` | `BooleanSupplier,IntSupplier, LongSupplier, DoubleSupplier` | | `UnaryOperator` | `T->T` | `IntUnaryOperator, LongUnaryOperator, DoubleUnaryOperator` | | `BinaryOperator` | `(T,T)->T` | `IntBinaryOperator, LongBinaryOperator, DoubleBinaryOperator` | | `BiPredicate` | `(L,R)->boolean` | | | `BiConsumer` | `(T,U)->void` | `ObjIntConsumer, ObjLongConsumer, ObjDoubleConsumer` | | `BiFunction` | `(T,U)->R` | `ToIntBiFunction, ToLongBiFunction, ToDoubleBiFunction` | ## Lambdas | | Lambda | | |:-----:|:--------|:-------| | | `(List list) -> list.isEmpty()` | `Predicate` | | | `() -> new Project()` | `Supplier` | | | `(Project p) -> System.out.println(p.getStars())` | `Consumer` | | / | `(int a, int b) -> a * b` | `IntBinaryOperator` | | | `(Project p1, Project p2) -> p1.getStars().compareTo(p2.getStars())` | `Comparator BiFunction ToIntBiFunction` | ## Lambda ## - lambda - lambda - - lambda - lambda - Java 8 `java.util.function` `Predicate``Function``Supplier``Consumer` `BinaryOperator` - Lambda - - `Comparator```Predicate` `Function` lambda
Web Proxy Viewer  |  New URL  |  Original Page