Enum Grade

  • All Implemented Interfaces:
    Serializable, Comparable<Grade>

    public enum Grade
    extends Enum<Grade>
    Enumeration for five grades form excellent to insufficient.
    Author:
    Herbert Praehofer
    • Enum Constant Detail

      • EXCELLENT

        public static final Grade EXCELLENT
      • GOOD

        public static final Grade GOOD
      • SATISFACTORY

        public static final Grade SATISFACTORY
      • SUFFICIENT

        public static final Grade SUFFICIENT
      • INSUFFICIENT

        public static final Grade INSUFFICIENT
    • Constructor Detail

      • Grade

        private Grade()
    • Method Detail

      • values

        public static Grade[] 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 (Grade c : Grade.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

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