示例#1
0
    // Creates "destIP,sourceIP" strings to tell calling function
    // which springs to make
    public HashSet<String> getSpringsToMake() {
      HashSet<String> toReturn = new HashSet<String>();

      for (Datum d : getData()) {
        toReturn.add(d.destIP + "," + d.sourceIP);
      }

      return toReturn;
    }
示例#2
0
    // HashSet filters out duplicates
    private HashSet<String> getNodesToMake() {
      HashSet<String> toReturn = new HashSet<String>();

      for (Datum d : getData()) {
        toReturn.add(d.destIP);
        toReturn.add(d.sourceIP);
      }

      return toReturn;
    }