title: Alternative to switch statement, when all possible cases are known?
body: <p>Im quite new to Java and i have stumbled upon the following problem.</p>
  
  <p>Im reading a list of movies from a txt file, one of the fields is a string representation of what genre(s) the movie is classified as, aswell as a numerical representation of 1-5 signifying that the movie has recieved one or more awards.</p>
  
  <p>eks. one movie could have the following value in this field "12bSt"
  this would signify that the movie is a b = biographical, S = sports, 2 = won an academy award.
  atm i do this:</p>
  
  <pre><code>    String[] genreStringToArray(String genre) {
      char[] genreCharArray = genre.toCharArray(); 
      this.genreArr = new String[genreCharArray.length];
      for (int i = 0; i &lt; genreCharArray.length; i++) {
          switch (genreCharArray[i]) {
              case 'a': genreArr[i] = "Action";       break;
              case 'A': genreArr[i] = "Animation";        break;
              case 'b': genreArr[i] = "biographical";     break;
              case 'c': genreArr[i] = "comedy";       break;
              case 'C': genreArr[i] = "children";     break;
              case 'd': genreArr[i] = "drama";        break;
              case 'D': genreArr[i] = "documentary";      break;
              case 'e': genreArr[i] = "epic";         break;
                                   ..... etc
              case 2:genreArr[i] = "Academy award";       break;
              case 3:genreArr[i] = "Palme d`or";      break;
              case 4:genreArr[i] = "Sight &amp; sound";       break;
              case 5:genreArr[i] = "AFI top 100";     break;
          }
      }
      return genreArr;
  }
  </code></pre>
  
  <p>my question is, what implementation would be more effective than this?</p>