Package cdc.enums

Class AbstractListDynamicEnum<V extends AbstractListDynamicEnum<V>>

java.lang.Object
cdc.enums.AbstractListDynamicEnum<V>
Type Parameters:
V - The dynamic enum concrete type.
All Implemented Interfaces:
DynamicEnum, ListDynamicEnum<V>, Comparable<V>

public abstract class AbstractListDynamicEnum<V extends AbstractListDynamicEnum<V>> extends Object implements ListDynamicEnum<V>, Comparable<V>
Dynamic enumeration of independent values.

Each value has a unique name.
This implementation supports these features:

A typical implementation should look like this:


 public final class Foo extends AbstractListDynamicEnum<Foo> {
     public static final Support<Foo> SUPPORT = support(Foo.class, Foo::new, Feature.RENAMING, ...);

     protected Foo(String value) {
         super(value);
     }
 }
 
Author:
Damien Carbonne