Code example for HashMap

Methods: keySet

0
    /** . */ 
    final HashMap<String, String> state = new HashMap<String, String>();
 
    @Override 
    protected Iterator<String> keys() {
      return state.keySet().iterator();
    } 
 
    @Override 
    public String get(Object key) {
      return state.get(key);
    } 
  } 
 
  public void testEmpty() { 
    TestMap map = new TestMap();
    assertEquals(0, map.size());
    assertEquals(null, map.get("a"));
    assertEquals(Collections.<String>emptyList(), Utils.list(map.keys()));
  } 
Connect your IDE to all the code out there  Get Codota for Java