Enum Class EducationLevel
- All Implemented Interfaces:
Serializable,Comparable<EducationLevel>,Constable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic EducationLevelfromLevel(int level) static EducationLevelfromString(String text) Converts a string to its correspondingEducationLevelenum constant, if possible.intgetLevel()booleanbooleanbooleanDeprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleantoString()static EducationLevelReturns the enum constant of this class with the specified name.static EducationLevel[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EARLY_CHILDHOOD
-
HIGH_SCHOOL
-
COLLEGE
-
POST_GRADUATE
-
DOCTORATE
-
-
Field Details
-
MIN_LEVEL
public static final int MIN_LEVEL -
MAX_LEVEL
public static final int MAX_LEVEL
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getToolTipText
-
getLevel
public int getLevel() -
isEarlyChildhood
Deprecated, for removal: This API element is subject to removal in a future version. -
isHighSchool
Deprecated, for removal: This API element is subject to removal in a future version. -
isCollege
public boolean isCollege() -
isPostGraduate
public boolean isPostGraduate() -
isDoctorate
public boolean isDoctorate() -
fromString
Converts a string to its correspondingEducationLevelenum constant, if possible.This method attempts to map the input string to an
EducationLevelin multiple ways:- First, it checks if the string matches an enum name exactly.
- Next, it attempts to parse the string as an integer and map it to the level of the enum.
- Finally, it checks for a case-insensitive match against the enum names.
If no match is found, a default value of
EARLY_CHILDHOODis returned, and an error is logged to indicate the invalid input.- Parameters:
text- the input string to be converted to anEducationLevel.- Returns:
- the
EducationLevelcorresponding to the input text, orEARLY_CHILDHOODif the input is invalid.
-
fromLevel
-
toString
- Overrides:
toStringin classEnum<EducationLevel>
-