/** * Returns a {@link java.util.Set} view of the mappings contained in this map. * The applyTransformToDestination is backed by the map, so changes to the map are * reflected in the applyTransformToDestination, and vice-versa. If the map is modified * while an iteration over the applyTransformToDestination is in progress (except through * the iterator's own <tt>remove</tt> operation, or through the * <tt>setValue</tt> operation on a map entry returned by the * iterator) the results of the iteration are undefined. The applyTransformToDestination * supports element removal, which removes the corresponding * mapping from the map, via the <tt>Iterator.remove</tt>, * <tt>Set.remove</tt>, <tt>removeAll</tt>, <tt>retainAll</tt> and * <tt>clear</tt> operations. It does not support the * <tt>add</tt> or <tt>addAll</tt> operations. * * @return a applyTransformToDestination view of the mappings contained in this map */ public Set<Entry<K,T,V>> entrySet() { Set<Entry<K,T,V>> ret = new HashSet<>(); for(Pair<K,T> pair : backedMap.keySet()) { ret.add(new Entry<>(pair.getFirst(),pair.getSecond(),backedMap.get(pair))); } return ret; }
/** * Returns a {@link java.util.Set} view of the mappings contained in this map. * The applyTransformToDestination is backed by the map, so changes to the map are * reflected in the applyTransformToDestination, and vice-versa. If the map is modified * while an iteration over the applyTransformToDestination is in progress (except through * the iterator's own <tt>remove</tt> operation, or through the * <tt>setValue</tt> operation on a map entry returned by the * iterator) the results of the iteration are undefined. The applyTransformToDestination * supports element removal, which removes the corresponding * mapping from the map, via the <tt>Iterator.remove</tt>, * <tt>Set.remove</tt>, <tt>removeAll</tt>, <tt>retainAll</tt> and * <tt>clear</tt> operations. It does not support the * <tt>add</tt> or <tt>addAll</tt> operations. * * @return a applyTransformToDestination view of the mappings contained in this map */ public Set<Entry<K,T,V>> entrySet() { Set<Entry<K,T,V>> ret = new HashSet<>(); for(Pair<K,T> pair : backedMap.keySet()) { ret.add(new Entry<>(pair.getFirst(),pair.getSecond(),backedMap.get(pair))); } return ret; }