Package com.scurrilous.circe
Class HashProviders
java.lang.Object
com.scurrilous.circe.HashProviders
Static utility methods for discovering
HashProvider instances.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic HashProviderbest(HashParameters params) Returns the best hash provider supporting at least a stateful implementation of a hash function with the given parameters.static HashProviderbest(HashParameters params, EnumSet<HashSupport> required) Returns the best hash provider supporting at least the given flags for a hash function with the given parameters.static Iterator<HashProvider>iterator()Returns an iterator over all knownHashProviderinstances.static SortedMap<EnumSet<HashSupport>,HashProvider> search(HashParameters params) Returns a map of hash providers supporting at least a stateful implementation of a hash function with the given parameters.static SortedMap<EnumSet<HashSupport>,HashProvider> search(HashParameters params, EnumSet<HashSupport> required) Returns a map of hash providers supporting at least the given flags for a hash function with the given parameters.
-
Field Details
-
ALL_PROVIDERS
-
-
Method Details
-
iterator
Returns an iterator over all knownHashProviderinstances.- Returns:
- an iterator over all HashProviders
-
best
Returns the best hash provider supporting at least a stateful implementation of a hash function with the given parameters.- Parameters:
params- the parameters defining the hash function- Returns:
- the best hash provider for the given parameters
- Throws:
UnsupportedOperationException- if no provider supports the parameters
-
best
Returns the best hash provider supporting at least the given flags for a hash function with the given parameters.- Parameters:
params- the parameters defining the hash functionrequired- the required support flags for a provider to be considered- Returns:
- the best hash provider for the given parameters
- Throws:
UnsupportedOperationException- if no provider supports the parameters
-
search
Returns a map of hash providers supporting at least a stateful implementation of a hash function with the given parameters.- Parameters:
params- the parameters defining the hash function- Returns:
- a sorted map of hash support flags to hash providers
-
search
public static SortedMap<EnumSet<HashSupport>,HashProvider> search(HashParameters params, EnumSet<HashSupport> required) Returns a map of hash providers supporting at least the given flags for a hash function with the given parameters.- Parameters:
params- the parameters defining the hash functionrequired- the required support flags for a provider to be included- Returns:
- a sorted map of hash support flags to hash providers
-