Skip to content
Snippets Groups Projects
Commit 93eaccfb authored by Tobias Pietzsch's avatar Tobias Pietzsch
Browse files

Implement equals() for CacheHints

parent 9c3d967c
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,10 @@ public class CacheHints
this.queuePriority = queuePriority;
this.enqueuToFront = enqueuToFront;
int value = loadingStrategy.hashCode();
value = 31 * value + queuePriority;
value = 31 * value + Boolean.hashCode( enqueuToFront );
hashcode = value;
}
/**
......@@ -107,4 +111,24 @@ public class CacheHints
{
return enqueuToFront;
}
@Override
public boolean equals( final Object other )
{
if ( this == other )
return true;
if ( !( other instanceof CacheHints ) )
return false;
final CacheHints that = ( CacheHints ) other;
return ( this.loadingStrategy == that.loadingStrategy ) && ( this.queuePriority == that.queuePriority ) && ( this.enqueuToFront == that.enqueuToFront );
}
private final int hashcode;
@Override
public int hashCode()
{
return hashcode;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment