Example #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;
    }
Example #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;
    }