|
| 1 | +package org.embeddedt.modernfix.util; |
| 2 | + |
| 3 | +import com.google.common.collect.ForwardingMap; |
| 4 | +import org.jetbrains.annotations.NotNull; |
| 5 | +import org.jetbrains.annotations.Nullable; |
| 6 | + |
| 7 | +import java.util.function.BiConsumer; |
| 8 | +import java.util.function.BiFunction; |
| 9 | +import java.util.function.Function; |
| 10 | + |
| 11 | +public abstract class ForwardingInclDefaultsMap<K, V> extends ForwardingMap<K, V> { |
| 12 | + @Override |
| 13 | + public V getOrDefault(Object key, V defaultValue) { |
| 14 | + return delegate().getOrDefault(key, defaultValue); |
| 15 | + } |
| 16 | + |
| 17 | + @Override |
| 18 | + public void forEach(BiConsumer<? super K, ? super V> action) { |
| 19 | + delegate().forEach(action); |
| 20 | + } |
| 21 | + |
| 22 | + @Override |
| 23 | + public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) { |
| 24 | + delegate().replaceAll(function); |
| 25 | + } |
| 26 | + |
| 27 | + @Nullable |
| 28 | + @Override |
| 29 | + public V putIfAbsent(K key, V value) { |
| 30 | + return delegate().putIfAbsent(key, value); |
| 31 | + } |
| 32 | + |
| 33 | + @Override |
| 34 | + public boolean remove(Object key, Object value) { |
| 35 | + return delegate().remove(key, value); |
| 36 | + } |
| 37 | + |
| 38 | + @Override |
| 39 | + public boolean replace(K key, V oldValue, V newValue) { |
| 40 | + return delegate().replace(key, oldValue, newValue); |
| 41 | + } |
| 42 | + |
| 43 | + @Nullable |
| 44 | + @Override |
| 45 | + public V replace(K key, V value) { |
| 46 | + return delegate().replace(key, value); |
| 47 | + } |
| 48 | + |
| 49 | + @Override |
| 50 | + public V computeIfAbsent(K key, @NotNull Function<? super K, ? extends V> mappingFunction) { |
| 51 | + return delegate().computeIfAbsent(key, mappingFunction); |
| 52 | + } |
| 53 | + |
| 54 | + @Override |
| 55 | + public V computeIfPresent(K key, @NotNull BiFunction<? super K, ? super V, ? extends V> remappingFunction) { |
| 56 | + return delegate().computeIfPresent(key, remappingFunction); |
| 57 | + } |
| 58 | + |
| 59 | + @Override |
| 60 | + public V compute(K key, @NotNull BiFunction<? super K, ? super V, ? extends V> remappingFunction) { |
| 61 | + return delegate().compute(key, remappingFunction); |
| 62 | + } |
| 63 | + |
| 64 | + @Override |
| 65 | + public V merge(K key, @NotNull V value, @NotNull BiFunction<? super V, ? super V, ? extends V> remappingFunction) { |
| 66 | + return delegate().merge(key, value, remappingFunction); |
| 67 | + } |
| 68 | +} |
0 commit comments