final Node<K, V>[] t; final int f = (t = table) == null ? 0 : t.length; final Traverser<K, V> it = new Traverser<K, V>(t, f, 0, f); final StringBuilder sb = new StringBuilder(); sb.append('{'); Node<K, V> p; if ((p = it.advance()) != null) { for (; ; ) { final K k = p.key; sb.append('='); sb.append(v == this ? "(this Map)" : v); if ((p = it.advance()) == null) break; sb.append(',').append(' ');
final Node<K, V>[] t; final int f = (t = table) == null ? 0 : t.length; final Traverser<K, V> it = new Traverser<K, V>(t, f, 0, f); final StringBuilder sb = new StringBuilder(); sb.append('{'); Node<K, V> p; if ((p = it.advance()) != null) { for (; ; ) { final K k = p.key; sb.append('='); sb.append(v == this ? "(this Map)" : v); if ((p = it.advance()) == null) break; sb.append(',').append(' ');
final Node<K, V>[] t; final int f = (t = table) == null ? 0 : t.length; final Traverser<K, V> it = new Traverser<K, V>(t, f, 0, f); final StringBuilder sb = new StringBuilder(); sb.append('{'); Node<K, V> p; if ((p = it.advance()) != null) { for (; ; ) { final K k = p.key; sb.append('='); sb.append(v == this ? "(this Map)" : v); if ((p = it.advance()) == null) break; sb.append(',').append(' ');
final Node<K, V>[] t; final int f = (t = table) == null ? 0 : t.length; final Traverser<K, V> it = new Traverser<K, V>(t, f, 0, f); final StringBuilder sb = new StringBuilder(); sb.append('{'); Node<K, V> p; if ((p = it.advance()) != null) { for (; ; ) { final K k = p.key; sb.append('='); sb.append(v == this ? "(this Map)" : v); if ((p = it.advance()) == null) break; sb.append(',').append(' ');
final Node<K, V>[] t; final int f = (t = table) == null ? 0 : t.length; final Traverser<K, V> it = new Traverser<K, V>(t, f, 0, f); final StringBuilder sb = new StringBuilder(); sb.append('{'); Node<K, V> p; if ((p = it.advance()) != null) { for (; ; ) { final K k = p.key; sb.append('='); sb.append(v == this ? "(this Map)" : v); if ((p = it.advance()) == null) break; sb.append(',').append(' ');
/** * Returns {@code true} if this map maps one or more keys to the * specified value. Note: This method may require a full traversal * of the map, and is much slower than method {@code containsKey}. * * @param value value whose presence in this map is to be tested * @return {@code true} if this map maps one or more keys to the * specified value * @throws NullPointerException if the specified value is null */ public boolean containsValue(final Object value) { if (value == null) throw new NullPointerException(); final Node<K, V>[] t; if ((t = table) != null) { final Traverser<K, V> it = new Traverser<K, V>(t, t.length, 0, t.length); for (Node<K, V> p; (p = it.advance()) != null; ) { final V v; if ((v = p.val) == value || (v != null && value.equals(v))) return true; } } return false; }
/** * Returns {@code true} if this map maps one or more keys to the * specified value. Note: This method may require a full traversal * of the map, and is much slower than method {@code containsKey}. * * @param value value whose presence in this map is to be tested * @return {@code true} if this map maps one or more keys to the * specified value * @throws NullPointerException if the specified value is null */ public boolean containsValue(final Object value) { if (value == null) throw new NullPointerException(); final Node<K, V>[] t; if ((t = table) != null) { final Traverser<K, V> it = new Traverser<K, V>(t, t.length, 0, t.length); for (Node<K, V> p; (p = it.advance()) != null; ) { final V v; if ((v = p.val) == value || (v != null && value.equals(v))) return true; } } return false; }
/** * Returns {@code true} if this map maps one or more keys to the * specified value. Note: This method may require a full traversal * of the map, and is much slower than method {@code containsKey}. * * @param value value whose presence in this map is to be tested * @return {@code true} if this map maps one or more keys to the * specified value * @throws NullPointerException if the specified value is null */ public boolean containsValue(final Object value) { if (value == null) throw new NullPointerException(); final Node<K, V>[] t; if ((t = table) != null) { final Traverser<K, V> it = new Traverser<K, V>(t, t.length, 0, t.length); for (Node<K, V> p; (p = it.advance()) != null; ) { final V v; if ((v = p.val) == value || (v != null && value.equals(v))) return true; } } return false; }
/** * Returns {@code true} if this map maps one or more keys to the * specified value. Note: This method may require a full traversal * of the map, and is much slower than method {@code containsKey}. * * @param value value whose presence in this map is to be tested * @return {@code true} if this map maps one or more keys to the * specified value * @throws NullPointerException if the specified value is null */ public boolean containsValue(final Object value) { if (value == null) throw new NullPointerException(); final Node<K, V>[] t; if ((t = table) != null) { final Traverser<K, V> it = new Traverser<K, V>(t, t.length, 0, t.length); for (Node<K, V> p; (p = it.advance()) != null; ) { final V v; if ((v = p.val) == value || (v != null && value.equals(v))) return true; } } return false; }