HashSet<Reaction> reactionSet = new HashSet<Reaction>();
reactionSet.add(r2);
reactionSet.add(r3);
KineticLaw kl = r2.createKineticLaw();
kl.createLocalParameter("LP1");
reactionSet.remove(r2); // unsuccessful as the hashCode of r2 has changed since we added it to the HashSet !!
// The javadoc is misleading on this case as it just says that the equals method will be used
// They probably use the hashcode as the key for the underlying HashMap.