Files
OnJava8/docs/book/22-Enumerations.md
2019-07-06 11:05:08 +08:00

62 lines
934 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[TOC]
<!-- Enumerations -->
# 第二十二章 枚举
> 关键字enum可以将一组具名的值的有限集合创建为一种新的类型而这些具名的值可以作为常规的程序组件使用。这是一种非常有用的功能
<!-- Basic enum Features -->
## 基本功能
<!-- Adding Methods to an enum -->
## 方法添加
<!-- enums in switch Statements -->
## switch语句
<!-- The Mystery of values() -->
## values方法
<!-- Implements, not Inherits -->
## 实现而非继承
<!-- Random Selection -->
## 随机选择
<!-- Using Interfaces for Organization -->
## 使用接口组织
<!-- Using EnumSet Instead of Flags -->
## 使用EnumSet替代Flags
<!-- Using EnumMap -->
## 使用EnumMap
<!-- Constant-Specific Methods -->
## 常量特定方法
<!-- Multiple Dispatching -->
## 多次调度
<!-- Summary -->
## 本章小结
<!-- 分页 -->
<div style="page-break-after: always;"></div>