--- jsr166/src/jsr166x/ConcurrentSkipListMap.java 2011/10/25 18:46:37 1.15 +++ jsr166/src/jsr166x/ConcurrentSkipListMap.java 2012/12/30 02:11:59 1.22 @@ -325,7 +325,7 @@ public class ConcurrentSkipListMap private transient DescendingEntrySet descendingEntrySet; /** - * Initialize or reset state. Needed by constructors, clone, + * Initializes or resets state. Needed by constructors, clone, * clear, readObject. and ConcurrentSkipListSet.clone. * (Note that comparator must be separately initialized.) */ @@ -414,7 +414,7 @@ public class ConcurrentSkipListMap } /** - * Return true if this node is a marker. This method isn't + * Returns true if this node is a marker. This method isn't * actually called in an any current code checking for markers * because callers will have already read value field and need * to use that read (not another done here) and so directly @@ -427,7 +427,7 @@ public class ConcurrentSkipListMap } /** - * Return true if this node is the header of base-level list. + * Returns true if this node is the header of base-level list. * @return true if this node is header node */ boolean isBaseHeader() { @@ -465,7 +465,7 @@ public class ConcurrentSkipListMap } /** - * Return value if this node contains a valid key-value pair, + * Returns value if this node contains a valid key-value pair, * else null. * @return this node's value if it isn't a marker or header or * is deleted, else null. @@ -478,8 +478,8 @@ public class ConcurrentSkipListMap } /** - * Create and return a new SnapshotEntry holding current - * mapping if this node holds a valid value, else null + * Creates and returns a new SnapshotEntry holding current + * mapping if this node holds a valid value, else null. * @return new entry or null */ SnapshotEntry createSnapshot() { @@ -599,7 +599,7 @@ public class ConcurrentSkipListMap /** * Returns the key corresponding to this entry. * - * @return the key corresponding to this entry. + * @return the key corresponding to this entry */ public K getKey() { return key; @@ -608,7 +608,7 @@ public class ConcurrentSkipListMap /** * Returns the value corresponding to this entry. * - * @return the value corresponding to this entry. + * @return the value corresponding to this entry */ public V getValue() { return value; @@ -616,7 +616,7 @@ public class ConcurrentSkipListMap /** * Always fails, throwing UnsupportedOperationException. - * @throws UnsupportedOperationException always. + * @throws UnsupportedOperationException always */ public V setValue(V value) { throw new UnsupportedOperationException(); @@ -646,7 +646,7 @@ public class ConcurrentSkipListMap * Returns a String consisting of the key followed by an * equals sign ("=") followed by the associated * value. - * @return a String representation of this entry. + * @return a String representation of this entry */ public String toString() { return getKey() + "=" + getValue(); @@ -696,7 +696,7 @@ public class ConcurrentSkipListMap } /** - * Compare using comparator or natural ordering. Used when the + * Compares using comparator or natural ordering. Used when the * ComparableUsingComparator approach doesn't apply. */ int compare(K k1, K k2) throws ClassCastException { @@ -708,9 +708,9 @@ public class ConcurrentSkipListMap } /** - * Return true if given key greater than or equal to least and + * Returns true if given key greater than or equal to least and * strictly less than fence, bypassing either test if least or - * fence oare null. Needed mainly in submap operations. + * fence are null. Needed mainly in submap operations. */ boolean inHalfOpenRange(K key, K least, K fence) { if (key == null) @@ -720,7 +720,7 @@ public class ConcurrentSkipListMap } /** - * Return true if given key greater than or equal to least and less + * Returns true if given key greater than or equal to least and less * or equal to fence. Needed mainly in submap operations. */ boolean inOpenRange(K key, K least, K fence) { @@ -733,7 +733,7 @@ public class ConcurrentSkipListMap /* ---------------- Traversal -------------- */ /** - * Return a base-level node with key strictly less than given key, + * Returns a base-level node with key strictly less than given key, * or the base-level header if there is no such node. Also * unlinks indexes to deleted nodes found along the way. Callers * rely on this side-effect of clearing indices to deleted nodes. @@ -766,7 +766,7 @@ public class ConcurrentSkipListMap } /** - * Return node holding key or null if no such, clearing out any + * Returns node holding key or null if no such, clearing out any * deleted nodes seen along the way. Repeatedly traverses at * base-level looking for key starting at predecessor returned * from findPredecessor, processing base-level deletions as @@ -807,7 +807,7 @@ public class ConcurrentSkipListMap * were performed. * * @param key the key - * @return node holding key, or null if no such. + * @return node holding key, or null if no such */ private Node findNode(Comparable key) { for (;;) { @@ -890,7 +890,7 @@ public class ConcurrentSkipListMap } /** - * Perform map.get via findNode. Used as a backup if doGet + * Performs map.get via findNode. Used as a backup if doGet * encounters an in-progress deletion. * @param key the key * @return the value, or null if absent @@ -965,7 +965,7 @@ public class ConcurrentSkipListMap } /** - * Return a random level for inserting a new node. + * Returns a random level for inserting a new node. * Hardwired to k=1, p=0.5, max 31. * * This uses a cheap pseudo-random function that according to @@ -987,7 +987,7 @@ public class ConcurrentSkipListMap } /** - * Create and add index nodes for given node. + * Creates and adds index nodes for given node. * @param z the node * @param level the level of the index */ @@ -1039,7 +1039,7 @@ public class ConcurrentSkipListMap } /** - * Add given index nodes from given level down to 1. + * Adds given index nodes from given level down to 1. * @param idx the topmost index node being inserted * @param h the value of head to use to insert. This must be * snapshotted by callers to provide correct insertion level @@ -1196,7 +1196,7 @@ public class ConcurrentSkipListMap } /** - * Version of remove with boolean return. Needed by view classes + * Version of remove with boolean return. Needed by view classes. */ boolean removep(Object key) { return doRemove(key, null) != null; @@ -1221,7 +1221,7 @@ public class ConcurrentSkipListMap } /** - * Remove first entry; return either its key or a snapshot. + * Removes first entry; return either its key or a snapshot. * @param keyOnly if true return key, else return SnapshotEntry * (This is a little ugly, but avoids code duplication.) * @return null if empty, first key if keyOnly true, else key,value entry @@ -1251,8 +1251,8 @@ public class ConcurrentSkipListMap } /** - * Clear out index nodes associated with deleted first entry. - * Needed by doRemoveFirst + * Clears out index nodes associated with deleted first entry. + * Needed by doRemoveFirst. */ private void clearIndexToFirst() { for (;;) { @@ -1271,7 +1271,7 @@ public class ConcurrentSkipListMap } /** - * Remove first entry; return key or null if empty. + * Removes first entry; return key or null if empty. */ K pollFirstKey() { return (K)doRemoveFirst(true); @@ -1378,7 +1378,7 @@ public class ConcurrentSkipListMap * last valid node. Needed by doRemoveLast. It is possible that * all successors of returned node will have been deleted upon * return, in which case this method can be retried. - * @return likely predecessor of last node. + * @return likely predecessor of last node */ private Node findPredecessorOfLast() { for (;;) { @@ -1405,7 +1405,7 @@ public class ConcurrentSkipListMap } /** - * Remove last entry; return key or null if empty. + * Removes last entry; return key or null if empty. */ K pollLastKey() { return (K)doRemoveLast(true); @@ -1456,7 +1456,7 @@ public class ConcurrentSkipListMap } /** - * Return SnapshotEntry for results of findNear. + * Returns SnapshotEntry for results of findNear. * @param kkey the key * @param rel the relation -- OR'ed combination of EQ, LT, GT * @return Entry fitting relation, or null if no such @@ -1473,21 +1473,21 @@ public class ConcurrentSkipListMap } /** - * Return ceiling, or first node if key is null + * Returns ceiling, or first node if key is null. */ Node findCeiling(K key) { return (key == null) ? findFirst() : findNear(key, GT|EQ); } /** - * Return lower node, or last node if key is null + * Returns lower node, or last node if key is null. */ Node findLower(K key) { return (key == null) ? findLast() : findNear(key, LT); } /** - * Return SnapshotEntry or key for results of findNear ofter screening + * Returns SnapshotEntry or key for results of findNear ofter screening * to ensure result is in given range. Needed by submaps. * @param kkey the key * @param rel the relation -- OR'ed combination of EQ, LT, GT @@ -1518,7 +1518,7 @@ public class ConcurrentSkipListMap } /** - * Find and remove least element of subrange. + * Finds and removes least element of subrange. * @param least minimum allowed key value * @param fence key greater than maximum allowed key value * @param keyOnly if true return key, else return SnapshotEntry @@ -1539,7 +1539,7 @@ public class ConcurrentSkipListMap } /** - * Find and remove greatest element of subrange. + * Finds and removes greatest element of subrange. * @param least minimum allowed key value * @param fence key greater than maximum allowed key value * @param keyOnly if true return key, else return SnapshotEntry @@ -1586,10 +1586,10 @@ public class ConcurrentSkipListMap * Constructs a new map containing the same mappings as the given map, * sorted according to the keys' natural order. * - * @param m the map whose mappings are to be placed in this map. + * @param m the map whose mappings are to be placed in this map * @throws ClassCastException if the keys in m are not Comparable, or - * are not mutually comparable. - * @throws NullPointerException if the specified map is null. + * are not mutually comparable + * @throws NullPointerException if the specified map is null */ public ConcurrentSkipListMap(Map m) { this.comparator = null; @@ -1615,7 +1615,7 @@ public class ConcurrentSkipListMap * Returns a shallow copy of this Map instance. (The keys and * values themselves are not cloned.) * - * @return a shallow copy of this Map. + * @return a shallow copy of this Map */ public Object clone() { ConcurrentSkipListMap clone = null; @@ -1779,12 +1779,12 @@ public class ConcurrentSkipListMap /** * Returns true if this map contains a mapping for the specified * key. - * @param key key whose presence in this map is to be tested. + * @param key key whose presence in this map is to be tested * @return true if this map contains a mapping for the - * specified key. + * specified key * @throws ClassCastException if the key cannot be compared with the keys - * currently in the map. - * @throws NullPointerException if the key is null. + * currently in the map + * @throws NullPointerException if the key is null */ public boolean containsKey(Object key) { return doGet(key) != null; @@ -1794,12 +1794,12 @@ public class ConcurrentSkipListMap * Returns the value to which this map maps the specified key. Returns * null if the map contains no mapping for this key. * - * @param key key whose associated value is to be returned. + * @param key key whose associated value is to be returned * @return the value to which this map maps the specified key, or - * null if the map contains no mapping for the key. + * null if the map contains no mapping for the key * @throws ClassCastException if the key cannot be compared with the keys - * currently in the map. - * @throws NullPointerException if the key is null. + * currently in the map + * @throws NullPointerException if the key is null */ public V get(Object key) { return doGet(key); @@ -1810,14 +1810,14 @@ public class ConcurrentSkipListMap * If the map previously contained a mapping for this key, the old * value is replaced. * - * @param key key with which the specified value is to be associated. - * @param value value to be associated with the specified key. + * @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 - * if there was no mapping for key. + * if there was no mapping for key * @throws ClassCastException if the key cannot be compared with the keys - * currently in the map. - * @throws NullPointerException if the key or value are null. + * currently in the map + * @throws NullPointerException if the key or value are null */ public V put(K key, V value) { if (value == null) @@ -1830,11 +1830,11 @@ public class ConcurrentSkipListMap * * @param key key for which mapping should be removed * @return previous value associated with specified key, or null - * if there was no mapping for key. + * if there was no mapping for key * * @throws ClassCastException if the key cannot be compared with the keys - * currently in the map. - * @throws NullPointerException if the key is null. + * currently in the map + * @throws NullPointerException if the key is null */ public V remove(Object key) { return doRemove(key, null); @@ -1845,10 +1845,10 @@ public class ConcurrentSkipListMap * specified value. This operation requires time linear in the * Map size. * - * @param value value whose presence in this Map is to be tested. + * @param value value whose presence in this Map is to be tested * @return true if a mapping to value exists; - * false otherwise. - * @throws NullPointerException if the value is null. + * false otherwise + * @throws NullPointerException if the value is null */ public boolean containsValue(Object value) { if (value == null) @@ -1875,7 +1875,7 @@ public class ConcurrentSkipListMap * will be inaccurate. Thus, this method is typically not very * useful in concurrent applications. * - * @return the number of elements in this map. + * @return the number of elements in this map */ public int size() { long count = 0; @@ -1888,7 +1888,7 @@ public class ConcurrentSkipListMap /** * Returns true if this map contains no key-value mappings. - * @return true if this map contains no key-value mappings. + * @return true if this map contains no key-value mappings */ public boolean isEmpty() { return findFirst() == null; @@ -1915,7 +1915,7 @@ public class ConcurrentSkipListMap * construction of the iterator, and may (but is not guaranteed to) * reflect any modifications subsequent to construction. * - * @return a set view of the keys contained in this map. + * @return a set view of the keys contained in this map */ public Set keySet() { /* @@ -1946,7 +1946,7 @@ public class ConcurrentSkipListMap * construction of the iterator, and may (but is not guaranteed * to) reflect any modifications subsequent to construction. * - * @return a set view of the keys contained in this map. + * @return a set view of the keys contained in this map */ public Set descendingKeySet() { /* @@ -1978,7 +1978,7 @@ public class ConcurrentSkipListMap * iterator, and may (but is not guaranteed to) reflect any * modifications subsequent to construction. * - * @return a collection view of the values contained in this map. + * @return a collection view of the values contained in this map */ public Collection values() { Values vs = values; @@ -2005,7 +2005,7 @@ public class ConcurrentSkipListMap * iterator.next() do not support the * setValue operation. * - * @return a collection view of the mappings contained in this map. + * @return a collection view of the mappings contained in this map */ public Set> entrySet() { EntrySet es = entrySet; @@ -2032,7 +2032,7 @@ public class ConcurrentSkipListMap * iterator.next() do not support the * setValue operation. * - * @return a collection view of the mappings contained in this map. + * @return a collection view of the mappings contained in this map */ public Set> descendingEntrySet() { DescendingEntrySet es = descendingEntrySet; @@ -2052,8 +2052,8 @@ public class ConcurrentSkipListMap * operation may return misleading results if either map is * concurrently modified during execution of this method. * - * @param o object to be compared for equality with this map. - * @return true if the specified object is equal to this map. + * @param o object to be compared for equality with this map + * @return true if the specified object is equal to this map */ public boolean equals(Object o) { if (o == this) @@ -2094,19 +2094,19 @@ public class ConcurrentSkipListMap * This is equivalent to *
      *   if (!map.containsKey(key))
-     *      return map.put(key, value);
+     *     return map.put(key, value);
      *   else
-     *      return map.get(key);
+     *     return map.get(key);
      * 
* except that the action is performed atomically. - * @param key key with which the specified value is to be associated. - * @param value value to be associated with the specified key. + * @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 - * if there was no mapping for key. + * if there was no mapping for key * * @throws ClassCastException if the key cannot be compared with the keys - * currently in the map. - * @throws NullPointerException if the key or value are null. + * currently in the map + * @throws NullPointerException if the key or value are null */ public V putIfAbsent(K key, V value) { if (value == null) @@ -2115,7 +2115,7 @@ public class ConcurrentSkipListMap } /** - * Remove entry for key only if currently mapped to given value. + * Removes entry for key only if currently mapped to given value. * Acts as *
      *  if ((map.containsKey(key) && map.get(key).equals(value)) {
@@ -2124,12 +2124,12 @@ public class ConcurrentSkipListMap
      * } else return false;
      * 
* except that the action is performed atomically. - * @param key key with which the specified value is associated. - * @param value value associated with the specified key. + * @param key key with which the specified value is associated + * @param value value associated with the specified key * @return true if the value was removed, false otherwise * @throws ClassCastException if the key cannot be compared with the keys - * currently in the map. - * @throws NullPointerException if the key or value are null. + * currently in the map + * @throws NullPointerException if the key or value are null */ public boolean remove(Object key, Object value) { if (value == null) @@ -2138,7 +2138,7 @@ public class ConcurrentSkipListMap } /** - * Replace entry for key only if currently mapped to given value. + * Replaces entry for key only if currently mapped to given value. * Acts as *
      *  if ((map.containsKey(key) && map.get(key).equals(oldValue)) {
@@ -2147,14 +2147,14 @@ public class ConcurrentSkipListMap
      * } else return false;
      * 
* except that the action is performed atomically. - * @param key key with which the specified value is associated. - * @param oldValue value expected to be associated with the specified key. - * @param newValue value to be associated with the specified key. + * @param key key with which the specified value is associated + * @param oldValue value expected to be associated with the specified key + * @param newValue value to be associated with the specified key * @return true if the value was replaced * @throws ClassCastException if the key cannot be compared with the keys - * currently in the map. + * currently in the map * @throws NullPointerException if key, oldValue or newValue are - * null. + * null */ public boolean replace(K key, V oldValue, V newValue) { if (oldValue == null || newValue == null) @@ -2175,7 +2175,7 @@ public class ConcurrentSkipListMap } /** - * Replace entry for key only if currently mapped to some value. + * Replaces entry for key only if currently mapped to some value. * Acts as *
      *  if ((map.containsKey(key)) {
@@ -2183,13 +2183,13 @@ public class ConcurrentSkipListMap
      * } else return null;
      * 
* except that the action is performed atomically. - * @param key key with which the specified value is associated. - * @param value value to be associated with the specified key. + * @param key key with which the specified value is associated + * @param value value to be associated with the specified key * @return previous value associated with specified key, or null - * if there was no mapping for key. + * if there was no mapping for key * @throws ClassCastException if the key cannot be compared with the keys - * currently in the map. - * @throws NullPointerException if the key or value are null. + * currently in the map + * @throws NullPointerException if the key or value are null */ public V replace(K key, V value) { if (value == null) @@ -2221,8 +2221,8 @@ public class ConcurrentSkipListMap /** * Returns the first (lowest) key currently in this map. * - * @return the first (lowest) key currently in this map. - * @throws NoSuchElementException Map is empty. + * @return the first (lowest) key currently in this map + * @throws NoSuchElementException Map is empty */ public K firstKey() { Node n = findFirst(); @@ -2234,8 +2234,8 @@ public class ConcurrentSkipListMap /** * Returns the last (highest) key currently in this map. * - * @return the last (highest) key currently in this map. - * @throws NoSuchElementException Map is empty. + * @return the last (highest) key currently in this map + * @throws NoSuchElementException Map is empty */ public K lastKey() { Node n = findLast(); @@ -2251,19 +2251,19 @@ public class ConcurrentSkipListMap * is empty.) The returned sorted map is backed by this map, so changes * in the returned sorted map are reflected in this map, and vice-versa. * - * @param fromKey low endpoint (inclusive) of the subMap. - * @param toKey high endpoint (exclusive) of the subMap. + * @param fromKey low endpoint (inclusive) of the subMap + * @param toKey high endpoint (exclusive) of the subMap * * @return a view of the portion of this map whose keys range from - * fromKey, inclusive, to toKey, exclusive. + * fromKey, inclusive, to toKey, exclusive * * @throws ClassCastException if fromKey and toKey * cannot be compared to one another using this map's comparator - * (or, if the map has no comparator, using natural ordering). + * (or, if the map has no comparator, using natural ordering) * @throws IllegalArgumentException if fromKey is greater than - * toKey. + * toKey * @throws NullPointerException if fromKey or toKey is - * null. + * null */ public ConcurrentNavigableMap subMap(K fromKey, K toKey) { if (fromKey == null || toKey == null) @@ -2276,14 +2276,14 @@ public class ConcurrentSkipListMap * strictly less than toKey. The returned sorted map is * backed by this map, so changes in the returned sorted map are * reflected in this map, and vice-versa. - * @param toKey high endpoint (exclusive) of the headMap. + * @param toKey high endpoint (exclusive) of the headMap * @return a view of the portion of this map whose keys are - * strictly less than toKey. + * strictly less than toKey * * @throws ClassCastException if toKey is not compatible * with this map's comparator (or, if the map has no comparator, - * if toKey does not implement Comparable). - * @throws NullPointerException if toKey is null. + * if toKey does not implement Comparable) + * @throws NullPointerException if toKey is null */ public ConcurrentNavigableMap headMap(K toKey) { if (toKey == null) @@ -2296,16 +2296,16 @@ public class ConcurrentSkipListMap * greater than or equal to fromKey. The returned sorted * map is backed by this map, so changes in the returned sorted * map are reflected in this map, and vice-versa. - * @param fromKey low endpoint (inclusive) of the tailMap. + * @param fromKey low endpoint (inclusive) of the tailMap * @return a view of the portion of this map whose keys are - * greater than or equal to fromKey. + * greater than or equal to fromKey * @throws ClassCastException if fromKey is not * compatible with this map's comparator (or, if the map has no * comparator, if fromKey does not implement - * Comparable). - * @throws NullPointerException if fromKey is null. + * Comparable) + * @throws NullPointerException if fromKey is null */ - public ConcurrentNavigableMap tailMap(K fromKey) { + public ConcurrentNavigableMap tailMap(K fromKey) { if (fromKey == null) throw new NullPointerException(); return new ConcurrentSkipListSubMap(this, fromKey, null); @@ -2319,12 +2319,12 @@ public class ConcurrentSkipListMap * there is no such entry. The returned entry does not * support the Entry.setValue method. * - * @param key the key. + * @param key the key * @return an Entry associated with ceiling of given key, or - * null if there is no such Entry. + * null if there is no such Entry * @throws ClassCastException if key cannot be compared with the - * keys currently in the map. - * @throws NullPointerException if key is null. + * keys currently in the map + * @throws NullPointerException if key is null */ public Map.Entry ceilingEntry(K key) { return getNear(key, GT|EQ); @@ -2334,12 +2334,12 @@ public class ConcurrentSkipListMap * Returns least key greater than or equal to the given key, or * null if there is no such key. * - * @param key the key. + * @param key the key * @return the ceiling key, or null - * if there is no such key. + * if there is no such key * @throws ClassCastException if key cannot be compared with the keys - * currently in the map. - * @throws NullPointerException if key is null. + * currently in the map + * @throws NullPointerException if key is null */ public K ceilingKey(K key) { Node n = findNear(key, GT|EQ); @@ -2352,12 +2352,12 @@ public class ConcurrentSkipListMap * such entry. The returned entry does not support * the Entry.setValue method. * - * @param key the key. + * @param key the key * @return an Entry with greatest key less than the given - * key, or null if there is no such Entry. + * key, or null if there is no such Entry * @throws ClassCastException if key cannot be compared with the keys - * currently in the map. - * @throws NullPointerException if key is null. + * currently in the map + * @throws NullPointerException if key is null */ public Map.Entry lowerEntry(K key) { return getNear(key, LT); @@ -2367,12 +2367,12 @@ public class ConcurrentSkipListMap * Returns the greatest key strictly less than the given key, or * null if there is no such key. * - * @param key the key. + * @param key the key * @return the greatest key less than the given - * key, or null if there is no such key. + * key, or null if there is no such key * @throws ClassCastException if key cannot be compared with the keys - * currently in the map. - * @throws NullPointerException if key is null. + * currently in the map + * @throws NullPointerException if key is null */ public K lowerKey(K key) { Node n = findNear(key, LT); @@ -2385,12 +2385,12 @@ public class ConcurrentSkipListMap * is no such entry. The returned entry does not support * the Entry.setValue method. * - * @param key the key. + * @param key the key * @return an Entry associated with floor of given key, or null - * if there is no such Entry. + * if there is no such Entry * @throws ClassCastException if key cannot be compared with the keys - * currently in the map. - * @throws NullPointerException if key is null. + * currently in the map + * @throws NullPointerException if key is null */ public Map.Entry floorEntry(K key) { return getNear(key, LT|EQ); @@ -2401,12 +2401,12 @@ public class ConcurrentSkipListMap * less than or equal to the given key, or null if there * is no such key. * - * @param key the key. + * @param key the key * @return the floor of given key, or null if there is no - * such key. + * such key * @throws ClassCastException if key cannot be compared with the keys - * currently in the map. - * @throws NullPointerException if key is null. + * currently in the map + * @throws NullPointerException if key is null */ public K floorKey(K key) { Node n = findNear(key, LT|EQ); @@ -2419,12 +2419,12 @@ public class ConcurrentSkipListMap * is no such entry. The returned entry does not support * the Entry.setValue method. * - * @param key the key. + * @param key the key * @return an Entry with least key greater than the given key, or - * null if there is no such Entry. + * null if there is no such Entry * @throws ClassCastException if key cannot be compared with the keys - * currently in the map. - * @throws NullPointerException if key is null. + * currently in the map + * @throws NullPointerException if key is null */ public Map.Entry higherEntry(K key) { return getNear(key, GT); @@ -2434,12 +2434,12 @@ public class ConcurrentSkipListMap * Returns the least key strictly greater than the given key, or * null if there is no such key. * - * @param key the key. + * @param key the key * @return the least key greater than the given key, or - * null if there is no such key. + * null if there is no such key * @throws ClassCastException if key cannot be compared with the keys - * currently in the map. - * @throws NullPointerException if key is null. + * currently in the map + * @throws NullPointerException if key is null */ public K higherKey(K key) { Node n = findNear(key, GT); @@ -2453,7 +2453,7 @@ public class ConcurrentSkipListMap * the Entry.setValue method. * * @return an Entry with least key, or null - * if the map is empty. + * if the map is empty */ public Map.Entry firstEntry() { for (;;) { @@ -2473,7 +2473,7 @@ public class ConcurrentSkipListMap * the Entry.setValue method. * * @return an Entry with greatest key, or null - * if the map is empty. + * if the map is empty */ public Map.Entry lastEntry() { for (;;) { @@ -2493,7 +2493,7 @@ public class ConcurrentSkipListMap * the Entry.setValue method. * * @return the removed first entry of this map, or null - * if the map is empty. + * if the map is empty */ public Map.Entry pollFirstEntry() { return (SnapshotEntry)doRemoveFirst(false); @@ -2506,7 +2506,7 @@ public class ConcurrentSkipListMap * the Entry.setValue method. * * @return the removed last entry of this map, or null - * if the map is empty. + * if the map is empty */ public Map.Entry pollLastEntry() { return (SnapshotEntry)doRemoveLast(false); @@ -3095,7 +3095,7 @@ public class ConcurrentSkipListMap } /** - * Returns underlying map. Needed by ConcurrentSkipListSet + * Returns underlying map. Needed by ConcurrentSkipListSet. * @return the backing map */ ConcurrentSkipListMap getMap() { @@ -3103,7 +3103,7 @@ public class ConcurrentSkipListMap } /** - * Returns least key. Needed by ConcurrentSkipListSet + * Returns least key. Needed by ConcurrentSkipListSet. * @return least key or null if from start */ K getLeast() { @@ -3111,7 +3111,7 @@ public class ConcurrentSkipListMap } /** - * Returns fence key. Needed by ConcurrentSkipListSet + * Returns fence key. Needed by ConcurrentSkipListSet. * @return fence key or null of to end */ K getFence() { @@ -3241,7 +3241,7 @@ public class ConcurrentSkipListMap return new ConcurrentSkipListSubMap(m, least, toKey); } - public ConcurrentNavigableMap tailMap(K fromKey) { + public ConcurrentNavigableMap tailMap(K fromKey) { if (fromKey == null) throw new NullPointerException(); if (!inOpenRange(fromKey))