title: creating two dimensional hashset functionality
body: <p>I am trying to make two dimensional hashset functionality. I have a loop that iterates through pairs of integers:</p>
  
  <pre><code>        ResultSet getAssociations;
          Statement getAssociationsSelect = sqlConn
                  .createStatement();
          getAssociations = getAssociationsSelect
                  .executeQuery("SELECT ProductId, ThemeId FROM ProductTheme");
          while(getAssociations.next()) {
              int productId1 = getAssociations.getInt(1);
              int themeId1 = getAssociations.getInt(2);
          }
  </code></pre>
  
  <p>When the current pair of integers does not match a previous pair of integers I want to store them. I figured a hashset would be the best approach because I can insert the pairs and it wont take repeats. How do I do this?</p>