马老师分布式文件存储系统-fASTDFS实战 马老师分布式存储框架fASTDFS
test.consumer(num, t -> System.out.println("consumer= " + t));
// predicate
test.predicate(num, t -> (t == 1));
// supplier
Integer supplier = test.supplier(() -> {
Random random = new Random();
return random.nextInt(10);
});
// function
Integer function = test.function(num, t -> {
Random random = new Random();
return random.nextInt(t);
});
}}