Package at.jku.ssw.fp.sect04_2.imp
Enum Grade
- java.lang.Object
-
- java.lang.Enum<Grade>
-
- at.jku.ssw.fp.sect04_2.imp.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 Summary
Enum Constants Enum Constant Description EXCELLENT
GOOD
INSUFFICIENT
SATISFACTORY
SUFFICIENT
-
Constructor Summary
Constructors Modifier Constructor Description private
Grade()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Grade
valueOf(String name)
Returns the enum constant of this type with the specified name.static Grade[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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 nameNullPointerException
- if the argument is null
-
-