How do I implement generic fields to enum? Currently I'm looking for a way to hold variety native data types on single enum. e.g:
public enum Module<E>
{
TEST_STRING("string"),
TEST_INT(3);
public E value;
Module (E value)
{
this.value = value;
}
}
As you may know this won't compile but what are my best alternatives to achieve this kind of structure?