/** * Removes the mapping for the specified key from this map if present. * * @param key key for which mapping should be removed * @return the previous value associated with the specified key, or * <tt>null</tt> if there was no mapping for the key * @throws ClassCastException if the specified key cannot be compared * with the keys currently in the map * @throws NullPointerException if the specified key is null */ public Object remove(Object key) { return doRemove(key, null); }
/** * Removes the mapping for the specified key from this map if present. * * @param key key for which mapping should be removed * @return the previous value associated with the specified key, or * <tt>null</tt> if there was no mapping for the key * @throws ClassCastException if the specified key cannot be compared * with the keys currently in the map * @throws NullPointerException if the specified key is null */ public Object remove(Object key) { return doRemove(key, null); }
/** * Removes the mapping for the specified key from this map if present. * * @param key key for which mapping should be removed * @return the previous value associated with the specified key, or * <tt>null</tt> if there was no mapping for the key * @throws ClassCastException if the specified key cannot be compared * with the keys currently in the map * @throws NullPointerException if the specified key is null */ public Object remove(Object key) { return doRemove(key, null); }
/** * {@inheritDoc} * * @throws ClassCastException if the specified key cannot be compared * with the keys currently in the map * @throws NullPointerException if the specified key is null */ public boolean remove(Object key, Object value) { if (key == null) throw new NullPointerException(); if (value == null) return false; return doRemove(key, value) != null; }
/** * {@inheritDoc} * * @throws ClassCastException if the specified key cannot be compared * with the keys currently in the map * @throws NullPointerException if the specified key is null */ public boolean remove(Object key, Object value) { if (key == null) throw new NullPointerException(); if (value == null) return false; return doRemove(key, value) != null; }
/** * {@inheritDoc} * * @throws ClassCastException if the specified key cannot be compared * with the keys currently in the map * @throws NullPointerException if the specified key is null */ public boolean remove(Object key, Object value) { if (key == null) throw new NullPointerException(); if (value == null) return false; return doRemove(key, value) != null; }
private Map.Entry removeLowest() { for (;;) { Node n = loNode(); if (n == null) return null; Object k = n.key; if (!inBounds(k)) return null; Object v = m.doRemove(k, null); if (v != null) return new AbstractMap.SimpleImmutableEntry(k, v); } }
private Map.Entry removeLowest() { for (;;) { Node n = loNode(); if (n == null) return null; Object k = n.key; if (!inBounds(k)) return null; Object v = m.doRemove(k, null); if (v != null) return new AbstractMap.SimpleImmutableEntry(k, v); } }
private Map.Entry removeHighest() { for (;;) { Node n = hiNode(); if (n == null) return null; Object k = n.key; if (!inBounds(k)) return null; Object v = m.doRemove(k, null); if (v != null) return new AbstractMap.SimpleImmutableEntry(k, v); } }
private Map.Entry removeLowest() { for (;;) { Node n = loNode(); if (n == null) return null; Object k = n.key; if (!inBounds(k)) return null; Object v = m.doRemove(k, null); if (v != null) return new AbstractMap.SimpleImmutableEntry(k, v); } }
private Map.Entry removeHighest() { for (;;) { Node n = hiNode(); if (n == null) return null; Object k = n.key; if (!inBounds(k)) return null; Object v = m.doRemove(k, null); if (v != null) return new AbstractMap.SimpleImmutableEntry(k, v); } }
private Map.Entry removeHighest() { for (;;) { Node n = hiNode(); if (n == null) return null; Object k = n.key; if (!inBounds(k)) return null; Object v = m.doRemove(k, null); if (v != null) return new AbstractMap.SimpleImmutableEntry(k, v); } }