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 differentIHashCodeImplementationimplementations.- Author:
- Philip Helger
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> IHashCodeImplementation<T>getBestMatchingHashCodeImplementation(Class<T> aClass)static intgetHashCode(Object aObj)static HashCodeImplementationRegistrygetInstance()static booleanisInstantiated()<T> voidregisterHashCodeImplementation(Class<T> aClass, IHashCodeImplementation<T> aImpl)Register a new hashCode implementationvoidreinitialize()EChangeunregisterHashCodeImplementation(Class<?> aClass)
-
-
-
Method Detail
-
isInstantiated
public static boolean isInstantiated()
-
getInstance
@Nonnull public static HashCodeImplementationRegistry 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
@Nonnull public EChange unregisterHashCodeImplementation(@Nonnull Class<?> aClass)
-
getBestMatchingHashCodeImplementation
@Nullable public <T> IHashCodeImplementation<T> getBestMatchingHashCodeImplementation(@Nullable Class<T> aClass)
-
reinitialize
public void reinitialize()
-
-