/** * Implements {@link Map#putAll(Map)}. */ public void putAll( Map other ) { Iterator i = other.keySet().iterator(); while( i.hasNext() ) { Object key = i.next(); put( key, other.get( key ) ); } }
/** * Implements {@link Map#putAll(Map)}. */ public void putAll( Map other ) { Iterator i = other.keySet().iterator(); while( i.hasNext() ) { Object key = i.next(); put( key, other.get( key ) ); } }
public void test_containsKey_nullMatchesIncorrectly() { StaticBucketMap map = new StaticBucketMap(17); map.put(null, "A"); assertEquals(true, map.containsKey(null)); // loop so we find a string that is in the same bucket as the null for (int i = 'A'; i <= 'Z'; i++) { String str = String.valueOf((char) i); assertEquals("String: " + str, false, map.containsKey(str)); } }
public void test_get_nullMatchesIncorrectly() { StaticBucketMap map = new StaticBucketMap(17); map.put(null, "A"); assertEquals("A", map.get(null)); // loop so we find a string that is in the same bucket as the null for (int i = 'A'; i <= 'Z'; i++) { String str = String.valueOf((char) i); assertEquals("String: " + str, null, map.get(str)); } }
public void test_containsValue_nullMatchesIncorrectly() { StaticBucketMap map = new StaticBucketMap(17); map.put("A", null); assertEquals(true, map.containsValue(null)); // loop so we find a string that is in the same bucket as the null for (int i = 'A'; i <= 'Z'; i++) { String str = String.valueOf((char) i); assertEquals("String: " + str, false, map.containsValue(str)); } }
/** * Implements {@link Map#putAll(Map)}. */ public void putAll( Map other ) { Iterator i = other.keySet().iterator(); while( i.hasNext() ) { Object key = i.next(); put( key, other.get( key ) ); } }
/** * Implements {@link Map#putAll(Map)}. */ public void putAll( Map other ) { Iterator i = other.keySet().iterator(); while( i.hasNext() ) { Object key = i.next(); put( key, other.get( key ) ); } }
/** * Implements {@link Map#putAll(Map)}. */ public void putAll( Map other ) { Iterator i = other.keySet().iterator(); while( i.hasNext() ) { Object key = i.next(); put( key, other.get( key ) ); } }
/** * Implements {@link Map#putAll(Map)}. */ public void putAll( Map other ) { Iterator i = other.keySet().iterator(); while( i.hasNext() ) { Object key = i.next(); put( key, other.get( key ) ); } }
/** * Implements {@link Map#putAll(Map)}. */ public void putAll( Map other ) { Iterator i = other.keySet().iterator(); while( i.hasNext() ) { Object key = i.next(); put( key, other.get( key ) ); } }