Lines Matching defs:map

30  * The map is sorted according to the {@linkplain Comparable natural
31 * ordering} of its keys, or by a {@link Comparator} provided at map
39 * <p>Note that the ordering maintained by a tree map, like any sorted map, and
41 * with {@code equals}</em> if this sorted map is to correctly implement the
45 * operation, but a sorted map performs all key comparisons using its {@code
47 * this method are, from the standpoint of the sorted map, equal. The behavior
48 * of a sorted map <em>is</em> well-defined even if its ordering is
53 * If multiple threads access a map concurrently, and at least one of the
54 * threads modifies the map structurally, it <em>must</em> be synchronized
59 * encapsulates the map.
60 * If no such object exists, the map should be "wrapped" using the
63 * unsynchronized access to the map: <pre>
68 * <em>fail-fast</em>: if the map is structurally modified at any time after
87 * associated map using {@code put}.)
93 * @param <K> the type of keys maintained by this map
111 * The comparator used to maintain order in this tree map, or
131 * Constructs a new, empty tree map, using the natural ordering of its
132 * keys. All keys inserted into the map must implement the {@link
136 * {@code k2} in the map. If the user attempts to put a key into the
137 * map that violates this constraint (for example, the user attempts to
138 * put a string key into a map whose keys are integers), the
147 * Constructs a new, empty tree map, ordered according to the given
148 * comparator. All keys inserted into the map must be <em>mutually
151 * {@code k1} and {@code k2} in the map. If the user attempts to put
152 * a key into the map that violates this constraint, the {@code put(Object
156 * @param comparator the comparator that will be used to order this map.
165 * Constructs a new tree map containing the same mappings as the given
166 * map, ordered according to the <em>natural ordering</em> of its keys.
167 * All keys inserted into the new map must implement the {@link
171 * {@code k2} in the map. This method runs in n*log(n) time.
173 * @param m the map whose mappings are to be placed in this map
176 * @throws NullPointerException if the specified map is null
184 * Constructs a new tree map containing the same mappings and
185 * using the same ordering as the specified sorted map. This
188 * @param m the sorted map whose mappings are to be placed in this map,
189 * and whose comparator is to be used to sort this map
190 * @throws NullPointerException if the specified map is null
205 * Returns the number of key-value mappings in this map.
207 * @return the number of key-value mappings in this map
214 * Returns {@code true} if this map contains a mapping for the specified
217 * @param key key whose presence in this map is to be tested
218 * @return {@code true} if this map contains a mapping for the
221 * with the keys currently in the map
223 * and this map uses natural ordering, or its comparator
231 * Returns {@code true} if this map maps one or more keys to the
233 * this map contains at least one mapping to a value {@code v} such
235 * operation will probably require time linear in the map size for
238 * @param value value whose presence in this map is to be tested
252 * or {@code null} if this map contains no mapping for the key.
254 * <p>More formally, if this map contains a mapping from a key
256 * equal to {@code k} according to the map's ordering, then this
261 * indicate that the map contains no mapping for the key; it's also
262 * possible that the map explicitly maps the key to {@code null}.
267 * with the keys currently in the map
269 * and this map uses natural ordering, or its comparator
296 * Copies all of the mappings from the specified map to this map.
297 * These mappings replace any mappings that this map had for any
298 * of the keys currently in the specified map.
300 * @param map mappings to be stored in this map
302 * the specified map prevents it from being stored in this map
303 * @throws NullPointerException if the specified map is null or
304 * the specified map contains a null key and this map does not
307 public void putAll(Map<? extends K, ? extends V> map) {
308 int mapSize = map.size();
309 if (size==0 && mapSize!=0 && map instanceof SortedMap) {
310 Comparator c = ((SortedMap)map).comparator();
314 buildFromSorted(mapSize, map.entrySet().iterator(),
322 super.putAll(map);
326 * Returns this map's entry for the given key, or {@code null} if the map
329 * @return this map's entry for the given key, or {@code null} if the map
332 * with the keys currently in the map
334 * and this map uses natural ordering, or its comparator
511 * Associates the specified value with the specified key in this map.
512 * If the map previously contained a mapping for the key, the old
520 * (A {@code null} return can also indicate that the map
523 * with the keys currently in the map
525 * and this map uses natural ordering, or its comparator
586 * (A {@code null} return can also indicate that the map
589 * with the keys currently in the map
591 * and this map uses natural ordering, or its comparator
605 * Removes all of the mappings from this map.
606 * The map will be empty after this call returns.
618 * @return a shallow copy of this map
687 * and this map uses natural ordering, or its comparator
698 * and this map uses natural ordering, or its comparator
709 * and this map uses natural ordering, or its comparator
720 * and this map uses natural ordering, or its comparator
731 * and this map uses natural ordering, or its comparator
742 * and this map uses natural ordering, or its comparator
753 * and this map uses natural ordering, or its comparator
764 * and this map uses natural ordering, or its comparator
784 * Returns a {@link Set} view of the keys contained in this map.
786 * The set is backed by the map, so changes to the map are
787 * reflected in the set, and vice-versa. If the map is modified
791 * which removes the corresponding mapping from the map, via the
817 * Returns a {@link Collection} view of the values contained in this map.
820 * The collection is backed by the map, so changes to the map are
821 * reflected in the collection, and vice-versa. If the map is
826 * mapping from the map, via the {@code Iterator.remove},
837 * Returns a {@link Set} view of the mappings contained in this map.
839 * The set is backed by the map, so changes to the map are
840 * reflected in the set, and vice-versa. If the map is modified
843 * {@code setValue} operation on a map entry returned by the
846 * mapping from the map, via the {@code Iterator.remove},
870 * null and this map uses natural ordering, or its comparator
885 * and this map uses natural ordering, or its comparator
899 * and this map uses natural ordering, or its comparator
913 * null and this map uses natural ordering, or its comparator
924 * and this map uses natural ordering, or its comparator
935 * and this map uses natural ordering, or its comparator
1027 KeySet(NavigableMap<E,Object> map) { m = map; }
1240 * The backing map.
1248 * backing map, and the other values are ignored. Otherwise,
1313 * Subclasses map to these using like-named "sub"
2332 * each value in the map. If null, each value is read from