public enum ScoreMode extends Enum<ScoreMode>
Example: Consider an elementary school student status monitoring system that records the height of students. Since the students' heights keep increasing, the "height" field is stored as an array. When querying, if we want to sort by height, we can set the ScoreMode to MAX, which will then return the most recent height.
public static final ScoreMode None
public static final ScoreMode Avg
public static final ScoreMode Max
public static final ScoreMode Min
public static final ScoreMode Total
public static ScoreMode[] values()
for (ScoreMode c : ScoreMode.values()) System.out.println(c);
public static ScoreMode valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值Copyright © 2025. All Rights Reserved.