标签:
public enum Direction {
L, LU, U, RU, R, RD, D, LD, STOP, JUMP;
}
for(Direction d: Direction.values()) {
this.drawPaoTong(g, d);
}
for (int i = 0; i < Direction.values().length; i++) {
Direction.values()[i];
}
枚举随机遍历:Direction.values()[new Random().nextInt(Direction.values().length)];
java.lang.Enum<E extends Enum<E>>
标签:
原文地址:http://www.cnblogs.com/ErrStr/p/5152676.html