public int pointsToSetHashCode(){
  final int PRIME=31;
  int result=1;
  for (  AllocAndContext elem : this) {
    result=PRIME * result + elem.hashCode();
  }
  return result;
}

public int pointsToSetHashCode ( ) { final int PRIME = 31 ; int result = 1 ; for ( AllocAndContext elem : this ) { result = PRIME * result + elem . hashCode ( ) ; } return result ; }
computes a hash code based on the contents of the points - to set . note that hashcode ( ) is not overwritten on purpose . this is because spark relies on comparison by object identity .
