2020-12-13 23:41:09 +01:00
|
|
|
package speiger.src.collections.PACKAGE.utils;
|
|
|
|
|
2021-04-26 22:25:09 +02:00
|
|
|
/**
|
|
|
|
* A Type Specific Strategy class that allows to give control hashcode generation and equals comparason for maps
|
|
|
|
* @Type(T)
|
|
|
|
*/
|
2020-12-13 23:41:09 +01:00
|
|
|
public interface STRATEGY KEY_GENERIC_TYPE
|
|
|
|
{
|
2021-04-26 22:25:09 +02:00
|
|
|
/**
|
|
|
|
* Type Specific HashCode function
|
|
|
|
* @param o the element that the hashcode is requested for (if object may be null)
|
|
|
|
* @return hashcode for the given entry
|
|
|
|
*/
|
2020-12-13 23:41:09 +01:00
|
|
|
public int hashCode(KEY_TYPE o);
|
|
|
|
|
2021-04-26 22:25:09 +02:00
|
|
|
/**
|
|
|
|
* Type Specific Equals function
|
|
|
|
* @param key the first element that should be compared with
|
|
|
|
* @param value the second element that should be compared with (if object may be null)
|
|
|
|
* @return if the elements match
|
|
|
|
*/
|
2020-12-13 23:41:09 +01:00
|
|
|
public boolean equals(KEY_TYPE key, KEY_TYPE value);
|
|
|
|
}
|