Class Error.Type

    • Method Detail

      • values

        public static Error.Type[] values()
        Retrieve all enumeration constants pre-defined by this enumeration class.

        Additional instances might exist at runtime, for example to represent a new constant added to this enumeration class in subsequent version of the API. Such new constant is represented as instance of Error.Type but is not pre-defined.

        Returns:
        Array of all pre-defined enumeration constants. Never null.
      • valueOf

        public static Error.Type valueOf​(java.lang.String name)
        Returns the enumeration constant for the specified name.

        If the name matches exactly the identifier used to declare an enumeration constant from this enumeration class, the constant in question will be returned.

        Otherwise, a new instance of Error.Type will be returned for the specified name, which will not be one of the pre-defined constant instances. Such new instance maps to the Error.Type.Values._UNKNOWN enum constant from the native Java enum.

        Parameters:
        name - The name of the constant to return. Must not be null.
        Returns:
        Enumeration constant for the specified name. Never null.
      • isUnknown

        public boolean isUnknown()
        Checks if this enumeration constant is unknown. Unknown is a constant that is not one of the pre-defined ones for this enumeration class. Also see valueOf(java.lang.String) and values().
        Returns:
        true if this constant is unknown, and false otherwise.
      • getEnumValue

        public Error.Type.Values getEnumValue()
        Returns a native Java enum constant representing this enumeration constant. The result is useful for usual handling of Java enum, for example it can be used in switch statements.

        If this enumeration constant is unknown, then Error.Type.Values._UNKNOWN enum constant is returned.

        The native Java enum is Error.Type.Values.

        Returns:
        The Java enum constant. Never null.