Helping ordinary people create extraordinary websites!
GET OUR NEWSLETTER
Your Email:
 

Getting Started with Enumerated Types

By Brett McLaughlin
2005-04-22


Going Further

Enums can also be used in conjunction with sets, and much like the new EnumMap construct, Tiger supplies a new Set implementation EnumSet that allows you to work with bitwise operators. Additionally, you can add methods to your enums, use them to implement interfaces, and define what are called value-specific class bodies, where specific code is attached to a particular value of an enum. These features are beyond the scope of this article, but they're well documented elsewhere (see Resources).


Tutorial Pages:
» Represent Constants in a Typesafe Manner Using Java 5.0
» Defining an Enum
» Working with Enumerated Values
» Enums and Collections
» Going Further
» Use Them, But Don't Abuse Them
» Resources


First published by IBM developerWorks


 | Bookmark
Related Tutorials:
» All about JAXP, Part 1
» Make Database Queries Without the Database
» Load List Values for Improved Efficiency
» 2 Ways To Implement Session Tracking
» A Simple Way to Read an XML File in Java
» Develop Aspect-Oriented Java Applications with Eclipse and AJDT

Advertise with Us!


Tutorials Scripts Web Hosting Developer Manuals
Resources