public interface ChecksumAlgorithmFactorySelector
ChecksumAlgorithmFactory
based on known factory names.
Note: this component is NOT meant to be implemented or extended by client, is exposed ONLY to make clients
able to get ChecksumAlgorithmFactory
instances.Modifier and Type | Method and Description |
---|---|
java.util.Collection<ChecksumAlgorithmFactory> |
getChecksumAlgorithmFactories()
Returns immutable collection of all supported algorithms.
|
boolean |
isChecksumExtension(java.lang.String extension)
Returns
true if passed in extension matches any known checksum extension. |
ChecksumAlgorithmFactory |
select(java.lang.String algorithmName)
Returns factory for given algorithm name, or throws if algorithm not supported.
|
java.util.List<ChecksumAlgorithmFactory> |
selectList(java.util.Collection<java.lang.String> algorithmNames)
Returns a list of factories in same order as algorithm names are ordered, or throws if any of the
algorithm name is not supported.
|
ChecksumAlgorithmFactory select(java.lang.String algorithmName)
java.lang.IllegalArgumentException
- if asked algorithm name is not supported.java.util.List<ChecksumAlgorithmFactory> selectList(java.util.Collection<java.lang.String> algorithmNames)
java.lang.IllegalArgumentException
- if any asked algorithm name is not supported.java.lang.NullPointerException
- if passed in list of names is null
.java.util.Collection<ChecksumAlgorithmFactory> getChecksumAlgorithmFactories()
RepositoryLayout.getChecksumAlgorithmFactories()
(in fact, is super set
of it).boolean isChecksumExtension(java.lang.String extension)
true
if passed in extension matches any known checksum extension. The extension string may
start or contain dot ("."), but does not have to. In former case "ends with" is checked
(i.e. "jar.sha1" -> true; ".sha1" -> true) while in latter equality (i.e. "sha1" -> true).