Enum IntegerParseError

java.lang.Object
java.lang.Enum<IntegerParseError>
ru.progrm_jarvis.javacommons.primitive.error.IntegerParseError
All Implemented Interfaces:
Serializable, Comparable<IntegerParseError>

public enum IntegerParseError extends Enum<IntegerParseError>
An error occurring while parsing an integer (e.g. an int).
  • Enum Constant Details

    • EMPTY

      public static final IntegerParseError EMPTY
      Parsed expression contains no digits at all.
    • ONLY_SIGN

      public static final IntegerParseError ONLY_SIGN
      Parsed expression contains only a sign (i.e. '+' or '-').
    • INVALID_CHARACTER

      public static final IntegerParseError INVALID_CHARACTER
      Parsed expression contains an invalid character.
    • OUT_OF_BOUNDS

      public static final IntegerParseError OUT_OF_BOUNDS
      Parsed expression represents a number which is out of resulting type's bounds.
  • Method Details

    • values

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

      public static IntegerParseError 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