private static HashMap uniqueResults()

in import/src/main/java/com/google/cloud/healthcare/imaging/dicomadapter/CFindService.java [56:68]


  private static HashMap<String, JSONObject> uniqueResults(List<JSONArray> responses) {
    HashMap<String, JSONObject> uniqueResults = new HashMap<>();
    for (JSONArray response : responses) {
      for (Object result : response) {
        JSONObject resultJson = (JSONObject) result;
        String key = getResultKey(resultJson);
        if (!uniqueResults.containsKey(key)) {
          uniqueResults.put(key, resultJson);
        }
      }
    }
    return uniqueResults;
  }