code: private void resolveConflictsBySelectingPreferredIslands(IslandSelection selection, Map<IslandCompetition, List<Island>> islandConflictMap) {
          // First select competing islands that are on the ideal line
          LOG.fine("addBestOfCompeting with competingIslandsOnIdealLine");
          makeDistanceMap(islandConflictMap.getOrDefault(IslandCompetition.CompetingIslandAndOnIdealIine, Collections.emptyList()))
              .values().stream()//
              .flatMap(List::stream)//
              .filter(selection::isIslandPossibleCandidate)//
              .forEach(selection::addIsland);
  
          // Second select other competing islands
          LOG.fine("addBestOfCompeting with otherCompetingIslands");
          makeDistanceMap(islandConflictMap.getOrDefault(IslandCompetition.CompetingIsland, Collections.emptyList()))
              .values().stream()//
              .flatMap(List::stream)//
              .filter(selection::isIslandPossibleCandidate)//
              .forEach(selection::addIsland);
  
          // Third select non competing islands
          LOG.fine("add non competing islands");
          islandConflictMap.getOrDefault(IslandCompetition.NonCompetingIsland, Collections.emptyList())
              .forEach(selection::addIsland);
      }
docs: /*
  The preferred Islands are directly added to the result Archipelago
  If we want to
  re-factor this into a pull construction rather then a push construction
  we have to move this code out of this method and move it to the caller
  class