📜  java 流查找特定元素 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:34.158000             🧑  作者: Mango

代码示例1
Customer james = customers.stream()
  .filter(customer -> "James".equals(customer.getName()))
  .findAny()
  .orElse(null);