コード例 #1
0
 private static final Location getTopLeft(Location northMost, Location westMost) {
   return Stream.iterate(northMost, Location::west)
       .filter(location -> !westMost.isWestOf(location))
       .findFirst()
       .get();
 }