/** * Gets an entrySet view of the map. * Changes made on the set are reflected in the map. * The set supports remove and clear but not add. * <p> * The Map Entry setValue() method only allow a new value to be set. * If the value being set is already in the map, an IllegalArgumentException * is thrown (as setValue cannot change the size of the map). * * @return the entrySet view */ @Override public Set<Map.Entry<K, V>> entrySet() { if (entrySet == null) { entrySet = new EntrySet<>(this); } return entrySet; }