[关闭]
@w1024020103 2017-01-26T16:44:58.000000Z 字数 788 阅读 501

Bittiger Lesson 4

bittiger java data structure


Java 8

Comparator

Lambda Expression "->"

Functional Interface predicates,comparator,runnable

Method References

Default Interface

Streams map/reduce/count/filter/flatMap/Collectors

Map

Comparator

Comparable

  1. public class Employee implements Comparable<Employee> {
  2. String name;
  3. int age;
  4. @Override
  5. public int compareTo(Employee that) {
  6. return

Comparator

  1. public class AgeComparator implements Comparator<Employee> {
  2. @Override
  3. public int compare(Employee e1, Employee e2)
  4. return e1.getAge() - e2.getAge();
  5. }

Lambda Expression

An anonymous function -- no name, in-line

Default Methods

Stream

Map

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注