title: Repeatable Collection in Java
body: <p>I was wondering if we had a repeatable key , value function in java ?
  I'm working on some key value with Hashtable .The problem is I can't add any key that has been existed in the table .
  would you happen to know any method for that ?</p>
  <p>this is a part of my code :</p>
  <pre><code>public class SymbolTable {
     public static Hashtable&lt;Object,Object&gt; rows = new Hashtable&lt;&gt;();
  //    Hashtable
      static int counter=1;
      public void addKeyword(Object keyword){
          rows.put(keyword,counter);
          counter++;
      }
      public void InstallID(){
      rows.put(&quot;id &quot;,counter);
      counter++;
      }
      public void otherTokens(String lexeme,Object attribute){
          rows.put(lexeme,attribute);
          counter++;
      }
      public void addnumber(String lexeme , Object attribute){
          rows.put(lexeme,attribute);
          counter++;
      }
  
      public Hashtable gettokens(){
          return rows;
      }
  }
  </code></pre>