Package net.walend.enum

This package contains runtime classes for supporting enumerated types as described in Josh Bloch's Effective Java, Item 21.

See:
          Description

Interface Summary
Enum A container for a Set of static values similar to a C enum.
Immutable If a class is declared final, has no mutator methods and no visible variable members, it should implement this marker interface.
Member A member of an Enum.
Singleton Classes that implement this interface are Singletons.
 

Class Summary
AbstractEnum A utility class that implements all of Enum's methods by delegating them to an underlying immutable Set.
IteratorOfImmutable Use this class to wrap Iterators when the Collection is Immutable.
 

Package net.walend.enum Description

This package contains runtime classes for supporting enumerated types as described in Josh Bloch's Effective Java, Item 21. See the sample chapter or buy the book.

The primary classes are Member, a member of an Enum, and Enum, an immutable Set of Members.

The Immutable interface marks classes that are final and have no mutator methods. Immutables are useful for thread-safe collections (well, if they don't change much). IteratorOfImmutable blocks an Iterator's remove() method.

AbstractEnum implements all the methods for Enum, by delegating them to an isolated unmodifiable Set.



Copyright (c) 2001, 2002, David Walend