title: Using SparseIntArray instead of HashMap <Integer, Integer> with putSerializable
body: <p>When I use a <code>HashMap</code> with an <code>Integer</code> key and data values in Android I get this message in Eclipse:</p>
  
  <pre><code>Use new SparseIntArray(...) for better performance
  </code></pre>
  
  <p>Now the problem is that <code>SparseIntArray()</code> doesn't implement the <code>Serializable</code> interface and can't be used with <code>getSerializable()</code> and <code>putSerializable()</code> in <code>onRestoreInstanceState()</code>.</p>
  
  <ol>
  <li><p>How important is using <code>SparseIntArray()</code> instead of the <code>HashMap&lt;Integer, Integer&gt;</code>? </p></li>
  <li><p>Should I go through the trouble of making <code>SparseIntArray</code> serializable? (My first idea is making a wrapper class that implements <code>Serializable</code>, is this the right way to go?)</p></li>
  </ol>