com.h3c.util.codec

## Enum Algorithm

- java.lang.Object
- - java.lang.Enum<Algorithm>
  - - com.h3c.util.codec.Algorithm

- All Implemented Interfaces:
    Serializable, Comparable<Algorithm>

      public enum Algorithm
      extends Enum<Algorithm>

  This enumeration declares the algorithms available for creating mappings in the codecs.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `CLASS_NAMES` This algorithm reverses the order of the segments in a dot-delimited string, then uses the prefix of the result.
    `PREFIX` This algorithm uses the first few characters of the original string.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getDefaultPreserve()` Return the default preserve value for this algorithm.
    `String` | `toString()` Return the internal code for this algorithm constant.
    `static Algorithm` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static Algorithm[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### PREFIX

          public static final Algorithm PREFIX

      This algorithm uses the first few characters of the original string. Duplicates are disambiguated with an integer suffix.

    - #### CLASS_NAMES

          public static final Algorithm CLASS_NAMES

      This algorithm reverses the order of the segments in a dot-delimited string, then uses the prefix of the result. Duplicates are disambiguated with an integer suffix.

  - ### Method Detail

    - #### values

          public static 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 (Algorithm c : 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 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 name
        `NullPointerException` - if the argument is null

    - #### toString

          public String toString()

      Return the internal code for this algorithm constant.
      Overrides:
        `toString` in class `Enum<Algorithm>`
      Returns:
        the internal code

    - #### getDefaultPreserve

          public int getDefaultPreserve()

      Return the default preserve value for this algorithm.
      Returns:
        the default preserve value

Copyright © 2014. All Rights Reserved.