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.112 by dl, Fri Mar 22 18:40:28 2013 UTC vs.
Revision 1.113 by dl, Wed Mar 27 19:46:34 2013 UTC

# Line 3547 | Line 3547 | public class ConcurrentSkipListMap<K,V>
3547                  return false;
3548              }
3549  
3550 <            public void forEach(Consumer<? super T> action) {
3550 >            public void forEachRemaining(Consumer<? super T> action) {
3551                  while (hasNext())
3552                      action.accept(next());
3553              }
3554 +
3555 +            public long estimateSize() {
3556 +                return Long.MAX_VALUE;
3557 +            }
3558 +
3559          }
3560  
3561          final class SubMapValueIterator extends SubMapIter<V> {
# Line 3838 | Line 3843 | public class ConcurrentSkipListMap<K,V>
3843              return null;
3844          }
3845  
3846 <        public void forEach(Consumer<? super K> action) {
3846 >        public void forEachRemaining(Consumer<? super K> action) {
3847              if (action == null) throw new NullPointerException();
3848              K f = fence;
3849              Comparator<? super K> cmp = comparator;
# Line 3927 | Line 3932 | public class ConcurrentSkipListMap<K,V>
3932              return null;
3933          }
3934  
3935 <        public void forEach(Consumer<? super V> action) {
3935 >        public void forEachRemaining(Consumer<? super V> action) {
3936              if (action == null) throw new NullPointerException();
3937              K f = fence;
3938              Comparator<? super K> cmp = comparator;
# Line 4015 | Line 4020 | public class ConcurrentSkipListMap<K,V>
4020              return null;
4021          }
4022  
4023 <        public void forEach(Consumer<? super Map.Entry<K,V>> action) {
4023 >        public void forEachRemaining(Consumer<? super Map.Entry<K,V>> action) {
4024              if (action == null) throw new NullPointerException();
4025              K f = fence;
4026              Comparator<? super K> cmp = comparator;
# Line 4065 | Line 4070 | public class ConcurrentSkipListMap<K,V>
4070                  Spliterator.ORDERED | Spliterator.CONCURRENT |
4071                  Spliterator.NONNULL;
4072          }
4073 +
4074 +        public final Comparator<Map.Entry<K,V>> getComparator() {
4075 +            return comparator == null ? null :
4076 +                Comparators.byKey(comparator);
4077 +        }
4078 +
4079      }
4080  
4081      // Unsafe mechanics

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines