title: Declare generic Java class in an android project
body: <p>i'm making a simple game for android and i need to declare a generic class to cast later in the code, i have 3 classes to chose from and they are chose dinamically, how can i achieve so?</p>
  
  <pre><code>enum difficulty {
      SIMPLE,
      MEDIUM,
      HARD
  };
  
  difficulty dif;
  
  //assign dif
  
  switch(dif) {
      case SIMPLE:
           ...
           break;
      case MEDIUM:
           ...
           break;
      case HARD:
           ...
           break;
  }
  </code></pre>
  
  <p>it all depends on which of these gets chosen..</p>