public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  TypedSet other=(TypedSet)obj;
  if (type == null) {
    if (other.type != null)     return false;
  }
 else   if (!type.equals(other.type))   return false;
  if (!Arrays.equals(values,other.values))   return false;
  return true;
}

public boolean equals ( Object obj ) { if ( this == obj ) return true ; if ( obj == null ) return false ; if ( getClass ( ) != obj . getClass ( ) ) return false ; TypedSet other = ( TypedSet ) obj ; if ( type == null ) { if ( other . type != null ) return false ; } else if ( ! type . equals ( other . type ) ) return false ; if ( ! Arrays . equals ( values , other . values ) ) return false ; return true ; }
two typed sets are equals if they have the same type and the elements of the set are the same ( and appear in the same order )
