diff --git a/src/com/t_oster/liblasercut/dithering/DitheringAlgorithm.java b/src/com/t_oster/liblasercut/dithering/DitheringAlgorithm.java index b46f0605b4f29e622f73e9fb0d6caa6b2e9295b0..e1e7652f19929aad08d5511b3cbad3c075a27d4e 100644 --- a/src/com/t_oster/liblasercut/dithering/DitheringAlgorithm.java +++ b/src/com/t_oster/liblasercut/dithering/DitheringAlgorithm.java @@ -86,6 +86,10 @@ public abstract class DitheringAlgorithm extends TimeIntensiveOperation implemen @Override public boolean equals(Object o) { + if (this == o) + { + return true; + } if (o == null || !getClass().equals(o.getClass())) { return false; @@ -111,8 +115,10 @@ public abstract class DitheringAlgorithm extends TimeIntensiveOperation implemen @Override public int hashCode() { int hash = 7; + hash += this.getClass().hashCode(); for (String key : this.getPropertyKeys()) { + hash += key.hashCode(); hash += this.getProperty(key).hashCode(); } return hash;