这是我的Startup.cs文件:
Stream<AWS_entity> firstPref = priorityStream.apply("TITLE")
.sorted(Comparator.comparing(AWS_entity::getCount).reversed());
Stream<AWS_entity> secondPref = priorityStream.apply("COMMERCIAL_ITEM");
Stream<AWS_entity> thirdPref = Stream.concat(priorityStream.apply("ORGANIZATION"),
priorityStream.apply("OTHER"));
return firstPref.findFirst()
.or(secondPref::findFirst)
.or(thirdPref::findFirst)
.map(AWS_entity::getName)
.orElse("none identified");