Package com.helger.commons.hashcode
Class HashCodeImplementationRegistry
java.lang.Object
com.helger.commons.hashcode.HashCodeImplementationRegistry
- All Implemented Interfaces:
IHashCodeImplementationRegistry
@ThreadSafe
@Singleton
public final class HashCodeImplementationRegistry
extends Object
implements IHashCodeImplementationRegistry
The main registry for the different
IHashCodeImplementation
implementations.- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescription<T> IHashCodeImplementation<T> getBestMatchingHashCodeImplementation(Class<T> aClass) static intgetHashCode(Object aObj) static boolean<T> voidregisterHashCodeImplementation(Class<T> aClass, IHashCodeImplementation<T> aImpl) Register a new hashCode implementationvoidunregisterHashCodeImplementation(Class<?> aClass)
-
Method Details
-
isInstantiated
public static boolean isInstantiated() -
getInstance
-
registerHashCodeImplementation
public <T> void registerHashCodeImplementation(@Nonnull Class<T> aClass, @Nonnull IHashCodeImplementation<T> aImpl) Description copied from interface:IHashCodeImplementationRegistryRegister a new hashCode implementation- Specified by:
registerHashCodeImplementationin interfaceIHashCodeImplementationRegistry- Type Parameters:
T- Type to register- Parameters:
aClass- The class for which the hashCode implementation is validaImpl- The main implementation
-
unregisterHashCodeImplementation
-
getBestMatchingHashCodeImplementation
@Nullable public <T> IHashCodeImplementation<T> getBestMatchingHashCodeImplementation(@Nullable Class<T> aClass) -
getHashCode
-
reinitialize
public void reinitialize()
-