/** * Returns a set view of the keys contained in this map. The set is backed by the map, so * changes to the map are reflected in the set, and vice-versa. The set supports element * removal, which removes the corresponding mapping from this 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 set view of the keys contained in this map. */ public Set<Integer> keySet() { Set<Integer> ks = keySet; return (ks != null ? ks : (keySet = new KeySet())); }
/** * Returns a set view of the keys contained in this map. The set is backed by the map, so * changes to the map are reflected in the set, and vice-versa. The set supports element * removal, which removes the corresponding mapping from this 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 set view of the keys contained in this map. */ public Set<Integer> keySet() { Set<Integer> ks = keySet; return (ks != null ? ks : (keySet = new KeySet())); }
/** * Returns a set view of the keys contained in this map. The set is backed by the map, so * changes to the map are reflected in the set, and vice-versa. The set supports element * removal, which removes the corresponding mapping from this 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 set view of the keys contained in this map. */ public Set keySet() { Set ks = keySet; return (ks != null ? ks : (keySet = new KeySet())); }