Package org.fcrepo.kernel.api.utils
Enum ContentDigest.DIGEST_ALGORITHM
- java.lang.Object
-
- java.lang.Enum<ContentDigest.DIGEST_ALGORITHM>
-
- org.fcrepo.kernel.api.utils.ContentDigest.DIGEST_ALGORITHM
-
- All Implemented Interfaces:
Serializable,Comparable<ContentDigest.DIGEST_ALGORITHM>
- Enclosing class:
- ContentDigest
public static enum ContentDigest.DIGEST_ALGORITHM extends Enum<ContentDigest.DIGEST_ALGORITHM>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ContentDigest.DIGEST_ALGORITHMfromAlgorithm(String alg)Return enum value for the provided algorithmstatic ContentDigest.DIGEST_ALGORITHMfromScheme(String argScheme)Return enum value for the provided scheme (e.g.Set<String>getAliases()static StringgetScheme(String alg)Return the scheme associated with the provided algorithm (e.g.static booleanisSupportedAlgorithm(String alg)Return true if the provided algorithm is included in this enumstatic ContentDigest.DIGEST_ALGORITHMvalueOf(String name)Returns the enum constant of this type with the specified name.static ContentDigest.DIGEST_ALGORITHM[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SHA1
public static final ContentDigest.DIGEST_ALGORITHM SHA1
-
SHA256
public static final ContentDigest.DIGEST_ALGORITHM SHA256
-
SHA512
public static final ContentDigest.DIGEST_ALGORITHM SHA512
-
SHA512256
public static final ContentDigest.DIGEST_ALGORITHM SHA512256
-
MD5
public static final ContentDigest.DIGEST_ALGORITHM MD5
-
MISSING
public static final ContentDigest.DIGEST_ALGORITHM MISSING
-
-
Method Detail
-
values
public static ContentDigest.DIGEST_ALGORITHM[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ContentDigest.DIGEST_ALGORITHM c : ContentDigest.DIGEST_ALGORITHM.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ContentDigest.DIGEST_ALGORITHM valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getScheme
public static String getScheme(String alg)
Return the scheme associated with the provided algorithm (e.g. SHA-1 returns urn:sha1)- Parameters:
alg- for which scheme is requested- Returns:
- scheme
-
fromScheme
public static ContentDigest.DIGEST_ALGORITHM fromScheme(String argScheme)
Return enum value for the provided scheme (e.g. urn:sha1 returns SHA-1)- Parameters:
argScheme- for which enum is requested- Returns:
- enum value associated with the arg scheme
-
fromAlgorithm
public static ContentDigest.DIGEST_ALGORITHM fromAlgorithm(String alg)
Return enum value for the provided algorithm- Parameters:
alg- algorithm name to seek- Returns:
- enum value associated with the algorithm name, or missing if not found
-
isSupportedAlgorithm
public static boolean isSupportedAlgorithm(String alg)
Return true if the provided algorithm is included in this enum- Parameters:
alg- to test- Returns:
- true if arg algorithm is supported
-
getAliases
public Set<String> getAliases()
- Returns:
- the aliases
-
-