title: Can I use annotation as a key in a HashMap?
body: <p>For example I have a Field that I got through reflection. This field has annotation on it. I use </p>
  
  <pre><code>field.getAnnotation(CustomAnnotation.class)
  </code></pre>
  
  <p>to get one. Can I use it as key in hash map? I mean of cause I can, but will this key be unique for the Field?</p>
  
  <hr>
  
  <p>I want <code>HashMap&lt;CustomAnnotation, Integer&gt;</code> where Integer value is an index of last used element in a collection that CustomAnnotation has:</p>
  
  <pre><code>@CustomAnnotation(values={"ONE", "TWO"})
  </code></pre>