ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/extra166y/CustomConcurrentHashMap.java
(Generate patch)

Comparing jsr166/src/extra166y/CustomConcurrentHashMap.java (file contents):
Revision 1.20 by jsr166, Mon Dec 5 04:08:47 2011 UTC vs.
Revision 1.24 by jsr166, Sun Dec 30 02:05:53 2012 UTC

# Line 320 | Line 320 | public class CustomConcurrentHashMap<K,
320           * Returns the value established during the creation of this
321           * node or, if since updated, the value set by the most
322           * recent call to setValue, or throws an exception if
323 <         * value could not be computed
323 >         * value could not be computed.
324           * @return the value
325           * @throws RuntimeException or Error if computeValue failed
326           */
# Line 544 | Line 544 | public class CustomConcurrentHashMap<K,
544      }
545  
546      /**
547 <     * Creates a new CustomConcurrentHashMap with the given parameters
547 >     * Creates a new CustomConcurrentHashMap with the given parameters.
548       * @param keyStrength the strength for keys
549       * @param keyEquivalence the Equivalence to use for keys
550       * @param valueStrength the strength for values
# Line 573 | Line 573 | public class CustomConcurrentHashMap<K,
573  
574      /**
575       * Returns a new map using Integer keys and the given value
576 <     * parameters
576 >     * parameters.
577       * @param valueStrength the strength for values
578       * @param valueEquivalence the Equivalence to use for values
579       * @param expectedSize an estimate of the number of elements
# Line 591 | Line 591 | public class CustomConcurrentHashMap<K,
591      }
592  
593      /**
594 <     * Returns a new map using the given key parameters and Integer values
594 >     * Returns a new map using the given key parameters and Integer values.
595       * @param keyStrength the strength for keys
596       * @param keyEquivalence the Equivalence to use for keys
597       * @param expectedSize an estimate of the number of elements
# Line 609 | Line 609 | public class CustomConcurrentHashMap<K,
609      }
610  
611      /**
612 <     * Returns a new map using Integer keys and values
612 >     * Returns a new map using Integer keys and values.
613       * @param expectedSize an estimate of the number of elements
614       * that will be held in the map. If no estimate is known,
615       * zero is an acceptable value.
# Line 623 | Line 623 | public class CustomConcurrentHashMap<K,
623      }
624  
625      /**
626 <     * Returns the segment for traversing table for key with given hash
626 >     * Returns the segment for traversing table for key with given hash.
627       * @param hash the hash code for the key
628       * @return the segment, or null if not yet initialized
629       */
# Line 656 | Line 656 | public class CustomConcurrentHashMap<K,
656      }
657  
658      /**
659 <     * Returns node for key, or null if none
659 >     * Returns node for key, or null if none.
660       */
661      final Node findNode(Object key, int hash, Segment seg) {
662          if (seg != null) {
# Line 697 | Line 697 | public class CustomConcurrentHashMap<K,
697      /**
698       * Returns the value associated with a key equivalent to the given
699       * key with respect to this map's key Equivalence, or {@code null}
700 <     * if no such mapping exists
700 >     * if no such mapping exists.
701       *
702       * @param  key   possible key
703       * @return the value associated with the key or <tt>null</tt> if
# Line 942 | Line 942 | public class CustomConcurrentHashMap<K,
942      }
943  
944      /**
945 <     * Remove node if its key or value are null
945 >     * Removes node if its key or value are null.
946       */
947      final void removeIfReclaimed(Node r) {
948          int hash = r.getLocator();
# Line 1600 | Line 1600 | public class CustomConcurrentHashMap<K,
1600          final CustomConcurrentHashMap<K,K> cchm;
1601  
1602          /**
1603 <         * Creates a set with the given parameters
1603 >         * Creates a set with the given parameters.
1604           * @param strength the strength of elements
1605           * @param equivalence the Equivalence to use
1606           * @param expectedSize an estimate of the number of elements
# Line 1621 | Line 1621 | public class CustomConcurrentHashMap<K,
1621           * exists, else adds and returns the given element.
1622           *
1623           * @param e the element
1624 <         * @return e, or an element equivalent to e.
1624 >         * @return e, or an element equivalent to e
1625           */
1626          public K intern(K e) {
1627              K oldElement = cchm.doPut(e, e, true);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines