title: Switching on a pair of `int`s
body: <p>Some context: I'm parsing an accounting ledger which has <code>account1</code> and <code>account2</code> as <code>int</code> types. Each is a number in the range [0, 99999]. I have many combinations to consider.</p>
  
  <p>Ideally I'd like to use something like</p>
  
  <pre><code>switch (account1, account2){
      case (1,1):
          /*account1 is 1, account2 is 1*/
      case (2,1):
          /*account1 is 2, account2 is 1*/
  }
  </code></pre>
  
  <p>and so on. (I only need to consider about 20 possible combinations).</p>
  
  <p>Is there a way I can achieve this in Java?</p>
  
  <p>I've considered this question <a href="https://stackoverflow.com/questions/10234487/storing-number-pairs-in-java">Storing number pairs in java</a></p>
  
  <p>and <em>could</em> build an <code>IntPair</code> class. Perhaps if I define <code>bool equals</code> then I could <code>switch</code> on an instance, in a similar manner in which you can switch on <code>java.lang.String</code>.</p>