March 2019
Intermediate to advanced
242 pages
6h 21m
English
Enums add type safety to finite and predefined sets of constants. Enums enable you to define a new type (such as a class or an interface) with a state and behavior. Project Amber is enhancing enums, taking them to the next level by adding type variables (generics) and allowing sharper enum type-checking. These will enable enums to define constants with type information, state, and behavior—applicable exclusively to each constant. These enhancements will reduce the need to refactor enums to classes in order to use generics.
In this chapter, we'll cover the following topics:
Read now
Unlock full access