public enum SortMode extends Enum<SortMode>
大多数情况下,一个字段只有一个值,所以这项无意义,默认为 MIN
当一个字段是一个集合(Array)时候,可以设置用该集合中的某一个值作为排序的依据
| Modifier and Type | Method and Description |
|---|---|
static SortMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SortMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SortMode MIN
public static final SortMode MAX
public static final SortMode AVG
public static SortMode[] values()
for (SortMode c : SortMode.values()) System.out.println(c);
public static SortMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2024. All Rights Reserved.