--- jsr166/src/main/java/util/AbstractMap.java 2004/12/31 13:00:33 1.1 +++ jsr166/src/main/java/util/AbstractMap.java 2005/04/18 05:18:29 1.6 @@ -1,7 +1,7 @@ /* * %W% %E% * - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ @@ -205,7 +205,7 @@ public abstract class AbstractMap i * @param key key with which the specified value is to be associated. * @param value value to be associated with the specified key. * - * @return previous value associated with specified key, or null + * @return the previous value associated with specified key, or null * if there was no mapping for key. (A null return can * also indicate that the map previously associated null * with the specified key, if the implementation supports @@ -247,7 +247,7 @@ public abstract class AbstractMap i * mapping for the specified key. * * @param key key whose mapping is to be removed from the map. - * @return previous value associated with specified key, or null + * @return the previous value associated with specified key, or null * if there was no entry for key. (A null return can * also indicate that the map previously associated null * with the specified key, if the implementation supports @@ -629,7 +629,7 @@ public abstract class AbstractMap i // Implementation Note: SimpleEntry and SimpleImmutableEntry // are distinct unrelated classes, even though they share // some code. Since you can't add or subtract final-ness - // of a field in a subclass, they can't share represenations, + // of a field in a subclass, they can't share representations, // and the amount of duplicated code is too small to warrant // exposing a common abstract class. @@ -643,7 +643,7 @@ public abstract class AbstractMap i * Map.entrySet().toArray */ public static class SimpleEntry implements Entry { - private K key; + private final K key; private V value; /** @@ -664,7 +664,7 @@ public abstract class AbstractMap i * * @param entry the entry to copy. */ - public SimpleEntry(Entry entry) { + public SimpleEntry(Entry entry) { this.key = entry.getKey(); this.value = entry.getValue(); } @@ -692,7 +692,7 @@ public abstract class AbstractMap i * value. * * @param value new value to be stored in this entry. - * @return old value corresponding to the entry. + * @return the old value corresponding to the entry. */ public V setValue(V value) { V oldValue = this.value; @@ -754,7 +754,7 @@ public abstract class AbstractMap i * * @param entry the entry to copy. */ - public SimpleImmutableEntry(Entry entry) { + public SimpleImmutableEntry(Entry entry) { this.key = entry.getKey(); this.value = entry.getValue(); }