code: protected void nullReference( List<Comparison> comparisons,
                                    Comparison comparisonToNull ) {
          if (comparisonToNull != null) {
              for (int i = 0; i != comparisons.size(); ++i) {
                  if (comparisons.get(i) == comparisonToNull) comparisons.set(i, null);
              }
          }
      }
docs: Find all occurrences of the comparison object in the supplied list and null the list's reference to it.
  
  @param comparisons the collection in which null references are to be placed
  @param comparisonToNull the comparison that is to be found and nulled in the collection