title: Create a unique key for Map from multiple Enum types
body: <p>I have a requirement where multiple enums will need to find a value in the i.e. <code>Map&lt;Key,Value&gt;</code> (combination of enums will return a unique value). 
  I think there are many options like having a wrapper Object say Key which will act as a Key. Also, we can use Guava Table if keys are limited to two (not sure).</p>
  
  <p>Wanted to check for below approach where two enums will map to a unique computed value, need suggestions for understanding - 
  <br/>
  i) If this approach is fine? 
  <br/>
  ii) If Yes, is it scalable? i.e. can it be easily made generic to support 'n' enums 
  as in <code>toKey(Enum ...enums)</code></p>
  
  <p>Below is snippet for two enums -  </p>
  
  <pre><code>static Integer toKey(Status s, SubStatus ss) {
     return Integer.valueOf(s.ordinal() * SubStatus.values().length + ss.ordinal());
  }
  </code></pre>
  
  <p>And</p>
  
  <pre><code>Status { NONE, PASS, WARN, REJECT }
  SubStatus { NONE, SOFT_REJECT, HARD_REJECT }
  
  Integer key1 = toKey(Status.REJECT, SubStatus.HARD_REJECT)
  Integer key2 = toKey(Status.WARN, SubStatus.NONE)
  
  then key1 != key2 
  </code></pre>
  
  <p>Thanks!</p>