Implemented forEachEntry() and forEachEntryWhile()

This commit is contained in:
leventov
2015-01-20 01:00:38 +07:00
parent f53a93275c
commit 06b326ab05
34 changed files with 575 additions and 239 deletions
@@ -18,6 +18,9 @@
package net.openhft.chronicle.map;
import net.openhft.chronicle.hash.function.Consumer;
import net.openhft.chronicle.hash.function.Function;
import net.openhft.chronicle.hash.function.Predicate;
import org.jetbrains.annotations.NotNull;
import org.junit.Assert;
@@ -252,6 +255,16 @@ public class ReplicationCheckingMap<K, V> implements ChronicleMap<K, V> {
return map1.keyClass();
}
@Override
public boolean forEachEntryWhile(Predicate<? super MapKeyContext<K, V>> predicate) {
return map1.forEachEntryWhile(predicate);
}
@Override
public void forEachEntry(Consumer<? super MapKeyContext<K, V>> action) {
map1.forEachEntry(action);
}
@Override
public Class<V> valueClass() {
return map1.valueClass();
@@ -264,12 +277,12 @@ public class ReplicationCheckingMap<K, V> implements ChronicleMap<K, V> {
@NotNull
@Override
public MapKeyContext<V> acquireContext(@NotNull K key, @NotNull V usingValue) {
public MapKeyContext<K, V> acquireContext(@NotNull K key, @NotNull V usingValue) {
throw new UnsupportedOperationException();
}
@Override
public MapKeyContext<V> context(K key) {
public MapKeyContext<K, V> context(K key) {
throw new UnsupportedOperationException();
}