title: Mapping int to int (in Java)
body: <p>In Java.</p>
  
  <p>How can I map a set of numbers(integers for example) to another set of numbers?
  All the numbers are positive and all the numbers are unique in their own set.</p>
  
  <p>The first set of numbers can have any value, the second set of numbers represent indexes of an array, and so the goal is to be able to access the numbers in the second set through the numbers in the first set. This is a one to one association.</p>
  
  <p>Speed is crucial as the method will have to be called many times each second.</p>
  
  <p>Edit: I tried it with SE hashmap implementation, but found it to be slow for my purposes.</p>