ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ConcurrentSkipListMap.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ConcurrentSkipListMap.java (file contents):
Revision 1.131 by jsr166, Thu Aug 8 04:23:21 2013 UTC vs.
Revision 1.132 by jsr166, Thu Aug 8 18:25:06 2013 UTC

# Line 42 | Line 42 | import java.util.function.Function;
42   * {@code containsKey}, {@code get}, {@code put} and
43   * {@code remove} operations and their variants.  Insertion, removal,
44   * update, and access operations safely execute concurrently by
45 < * multiple threads.  Iterators are <i>weakly consistent</i>, returning
46 < * elements reflecting the state of the map at some point at or since
47 < * the creation of the iterator.  They do <em>not</em> throw {@link
48 < * java.util.ConcurrentModificationException ConcurrentModificationException},
49 < * and may proceed concurrently with other operations. Ascending key ordered
50 < * views and their iterators are faster than descending ones.
45 > * multiple threads.  Iterators and spliterators are <i>weakly consistent</i>,
46 > * returning elements reflecting the state of the map at some point at or
47 > * since the creation of the iterator.  They do <em>not</em> throw
48 > * {@link java.util.ConcurrentModificationException
49 > * ConcurrentModificationException}, and may proceed concurrently with other
50 > * operations.  Ascending key ordered views and their iterators are faster
51 > * than descending ones.
52   *
53   * <p>All {@code Map.Entry} pairs returned by methods in this class
54   * and its views represent snapshots of mappings at the time they were
# Line 1775 | Line 1776 | public class ConcurrentSkipListMap<K,V>
1776  
1777      /**
1778       * Returns a {@link NavigableSet} view of the keys contained in this map.
1779 <     * The set's iterator returns the keys in ascending order.
1780 <     * The set is backed by the map, so changes to the map are
1779 >     *
1780 >     * <p>The set's iterator returns the keys in ascending order.
1781 >     * The set's spliterator additionally reports {@link Spliterator#CONCURRENT},
1782 >     * {@link Spliterator#NONNULL}, {@link Spliterator#SORTED} and
1783 >     * {@link Spliterator#ORDERED}, with an encounter order that is ascending
1784 >     * key order.  The spliterator's comparator (see
1785 >     * {@link java.util.Spliterator#getComparator()}) is {@code null} if
1786 >     * the map's comparator (see {@link #comparator()}) is {@code null}.
1787 >     * Otherwise, the spliterator's comparator is the same as or imposes the
1788 >     * same total ordering as the map's comparator.
1789 >     *
1790 >     * <p>The set is backed by the map, so changes to the map are
1791       * reflected in the set, and vice-versa.  The set supports element
1792       * removal, which removes the corresponding mapping from the map,
1793       * via the {@code Iterator.remove}, {@code Set.remove},
# Line 1784 | Line 1795 | public class ConcurrentSkipListMap<K,V>
1795       * operations.  It does not support the {@code add} or {@code addAll}
1796       * operations.
1797       *
1798 <     * <p>The view's {@code iterator} is a "weakly consistent" iterator that
1799 <     * will never throw {@link java.util.ConcurrentModificationException
1800 <     * ConcurrentModificationException}, and guarantees to traverse elements
1801 <     * as they existed upon construction of the iterator, and may (but is not
1802 <     * guaranteed to) reflect any modifications subsequent to construction.
1798 >     * <p>The view's iterators and spliterators are "weakly consistent":
1799 >     * they will never throw {@link java.util.ConcurrentModificationException
1800 >     * ConcurrentModificationException}; are guaranteed to traverse elements
1801 >     * as they existed upon construction; and may (but are not guaranteed to)
1802 >     * reflect any modifications subsequent to construction.
1803       *
1804       * <p>This method is equivalent to method {@code navigableKeySet}.
1805       *
# Line 1806 | Line 1817 | public class ConcurrentSkipListMap<K,V>
1817  
1818      /**
1819       * Returns a {@link Collection} view of the values contained in this map.
1820 <     * The collection's iterator returns the values in ascending order
1821 <     * of the corresponding keys.
1822 <     * The collection is backed by the map, so changes to the map are
1820 >     * <p>The collection's iterator returns the values in ascending order
1821 >     * of the corresponding keys. The collections's spliterator additionally
1822 >     * reports {@link Spliterator#CONCURRENT}, {@link Spliterator#NONNULL} and
1823 >     * {@link Spliterator#ORDERED}, with an encounter order that is ascending
1824 >     * order of the corresponding keys.
1825 >     *
1826 >     * <p>The collection is backed by the map, so changes to the map are
1827       * reflected in the collection, and vice-versa.  The collection
1828       * supports element removal, which removes the corresponding
1829       * mapping from the map, via the {@code Iterator.remove},
# Line 1816 | Line 1831 | public class ConcurrentSkipListMap<K,V>
1831       * {@code retainAll} and {@code clear} operations.  It does not
1832       * support the {@code add} or {@code addAll} operations.
1833       *
1834 <     * <p>The view's {@code iterator} is a "weakly consistent" iterator that
1835 <     * will never throw {@link java.util.ConcurrentModificationException
1836 <     * ConcurrentModificationException}, and guarantees to traverse elements
1837 <     * as they existed upon construction of the iterator, and may (but is not
1838 <     * guaranteed to) reflect any modifications subsequent to construction.
1834 >     * <p>The view's iterators and spliterators are "weakly consistent":
1835 >     * they will never throw {@link java.util.ConcurrentModificationException
1836 >     * ConcurrentModificationException}; are guaranteed to traverse elements
1837 >     * as they existed upon construction; and may (but are not guaranteed to)
1838 >     * reflect any modifications subsequent to construction.
1839       */
1840      public Collection<V> values() {
1841          Values<V> vs = values;
# Line 1829 | Line 1844 | public class ConcurrentSkipListMap<K,V>
1844  
1845      /**
1846       * Returns a {@link Set} view of the mappings contained in this map.
1847 <     * The set's iterator returns the entries in ascending key order.
1848 <     * The set is backed by the map, so changes to the map are
1847 >     *
1848 >     * <p>The set's iterator returns the entries in ascending key order.  The
1849 >     * set's spliterator additionally reports {@link Spliterator#CONCURRENT},
1850 >     * {@link Spliterator#NONNULL}, {@link Spliterator#SORTED} and
1851 >     * {@link Spliterator#ORDERED}, with an encounter order that is ascending
1852 >     * key order.
1853 >     *
1854 >     * <p>The set is backed by the map, so changes to the map are
1855       * reflected in the set, and vice-versa.  The set supports element
1856       * removal, which removes the corresponding mapping from the map,
1857       * via the {@code Iterator.remove}, {@code Set.remove},
# Line 1838 | Line 1859 | public class ConcurrentSkipListMap<K,V>
1859       * operations.  It does not support the {@code add} or
1860       * {@code addAll} operations.
1861       *
1862 <     * <p>The view's {@code iterator} is a "weakly consistent" iterator that
1863 <     * will never throw {@link java.util.ConcurrentModificationException
1864 <     * ConcurrentModificationException}, and guarantees to traverse elements
1865 <     * as they existed upon construction of the iterator, and may (but is not
1866 <     * guaranteed to) reflect any modifications subsequent to construction.
1867 <     *
1868 <     * <p>The {@code Map.Entry} elements returned by
1869 <     * {@code iterator.next()} do <em>not</em> support the
1870 <     * {@code setValue} operation.
1862 >     * <p>The view's iterators and spliterators are "weakly consistent":
1863 >     * they will never throw {@link java.util.ConcurrentModificationException
1864 >     * ConcurrentModificationException}; are guaranteed to traverse elements
1865 >     * as they existed upon construction; and may (but are not guaranteed to)
1866 >     * reflect any modifications subsequent to construction.
1867 >     *
1868 >     * <p>The {@code Map.Entry} elements traversed by the {@code iterator}
1869 >     * or {@code spliterator} do <em>not</em> support the {@code setValue}
1870 >     * operation.
1871       *
1872       * @return a set view of the mappings contained in this map,
1873       *         sorted in ascending key order

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines