@FunctionalInterface
public interface Consumer<T> {
/**
* Performs this operation on the given argument.
*
* @param t the input argument
*/
void accept(T t);
...
1、Function函数
public static void main(String[] args) {
TestController t = new TestController();
new TestController().aaa(3,value -> t.bbb(value));
}
public int bbb(int b){
...
Demo:package com.qhong;public class Main { public static void main(String[] args) throws Exception { new Thread(new Runnable(){ @Override public void run(){ ...
1、Collectors.toMap 将List转Map
public class Demo{
public static void main(String[] args) {
// TODO Auto-generated method stub
List<UserBo> list = new ArrayList<>...
code:package com.qhong;import java.util.ArrayList;import java.util.Arrays;import java.util.List;import static com.qhong.EmployeePredicates.*;public class Main { public static void main(String[] arg...