public enum OrientationType extends Enum<OrientationType>
文件名:DirectionType.java
用途:标记上、下、左、右四个朝向的枚举
编码时间:2022年10月24日 上午10:38:23
修改时间:2022年10月24日 上午10:38:23
Modifier and Type | Method and Description |
---|---|
int |
getCode()
该方法用于返回枚举的编码
|
OrientationType |
valueOf(int code)
该方法用于根据枚举编码,判断与之相同编码的枚举,并进行返回。若未找到相同的枚举,则返回null
|
static OrientationType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OrientationType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OrientationType UP
public static final OrientationType DOWN
public static final OrientationType LEFT
public static final OrientationType RIGHT
public static OrientationType[] values()
for (OrientationType c : OrientationType.values()) System.out.println(c);
public static OrientationType 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 nullpublic int getCode()
public OrientationType valueOf(int code)
code
- 枚举编码Copyright © 2024. All rights reserved.