Skip to content
Snippets Groups Projects
Commit 7a8115a3 authored by Thomas Oster's avatar Thomas Oster
Browse files

hashCode and equals improvements

parent 71f36e80
No related branches found
Tags visicut1.6
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment