This commit is contained in:
Sushant 2019-05-04 13:10:12 +03:00
parent 7dae64dd74
commit 15dfc6fa36
3 changed files with 4 additions and 12 deletions

View File

@ -49,7 +49,7 @@ public class GuavaMapFromSet<K, V> extends AbstractMap<K, V> {
} }
@Override @Override
public Entry<K, V> next() { public Map.Entry<K, V> next() {
K key = this.inner.next(); K key = this.inner.next();
return new SingleEntry(key); return new SingleEntry(key);
} }
@ -67,7 +67,7 @@ public class GuavaMapFromSet<K, V> extends AbstractMap<K, V> {
} }
@Override @Override
public Iterator<Entry<K, V>> iterator() { public Iterator<Map.Entry<K, V>> iterator() {
return new EntryIterator(); return new EntryIterator();
} }
@ -79,7 +79,7 @@ public class GuavaMapFromSet<K, V> extends AbstractMap<K, V> {
} }
private WeakHashMap<K, V> cache; private WeakHashMap<K, V> cache;
private Set<Entry<K, V>> entries; private Set<Map.Entry<K, V>> entries;
private Function<? super K, ? extends V> function; private Function<? super K, ? extends V> function;
public GuavaMapFromSet(Set<K> keys, Function<? super K, ? extends V> function) { public GuavaMapFromSet(Set<K> keys, Function<? super K, ? extends V> function) {
@ -89,7 +89,7 @@ public class GuavaMapFromSet<K, V> extends AbstractMap<K, V> {
} }
@Override @Override
public Set<Entry<K, V>> entrySet() { public Set<Map.Entry<K, V>> entrySet() {
return this.entries; return this.entries;
} }

View File

@ -121,6 +121,5 @@ public class GuavaRangeSetUnitTest {
.add(Range.closed(0, 2)) .add(Range.closed(0, 2))
.add(Range.closed(3, 5)) .add(Range.closed(3, 5))
.add(Range.closed(5, 8)).build(); .add(Range.closed(5, 8)).build();
} }
} }

View File

@ -128,11 +128,4 @@ public class GuavaSetOperationsUnitTest {
assertEquals("Adam", topTwo.get(0)); assertEquals("Adam", topTwo.get(0));
assertEquals("Tom", topTwo.get(1)); assertEquals("Tom", topTwo.get(1));
} }
} }