title: How can I write a class like Android ContentValues?
body: <p>My question is that: Android SDK has a class was named ContentValues.
  That class keeps our values to save them to DB easily.</p>
  
  <p>But it has these methods:</p>
  
  <pre><code>put(String key, Integer value)
  put(String key, Float value)
  put(String key, Byte value)  etc
  </code></pre>
  
  <p>so this means it can take and keep Integer, Byte, Float, Double...etc.</p>
  
  <p>I wonder how this class can keep all these different-typed variables?</p>
  
  <p>I know how to use it. I wonder how can we write a class like that</p>
  
  <p>Any idea?</p>