Enum Class LibraryManager.HashAlgorithm

java.lang.Object
java.lang.Enum<LibraryManager.HashAlgorithm>
net.glowstone.util.library.LibraryManager.HashAlgorithm
All Implemented Interfaces:
Serializable, Comparable<LibraryManager.HashAlgorithm>, Constable
Enclosing class:
LibraryManager

public static enum LibraryManager.HashAlgorithm extends Enum<LibraryManager.HashAlgorithm>
An enum containing the supported hash algorithms.
  • Enum Constant Details

  • Method Details

    • values

      public static LibraryManager.HashAlgorithm[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static LibraryManager.HashAlgorithm valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getAlgorithm

      public static LibraryManager.HashAlgorithm getAlgorithm(String name)
      Gets the hash algorithm corresponding to the given name.
      Parameters:
      name - the name of the algorithm
      Returns:
      the corresponding algorithm, or null if none exists
    • getFunction

      public com.google.common.hash.HashFunction getFunction()
      The hash function for this algorithm.
    • getName

      public String getName()
      The name of the algorithm, used in configuration files.