com.effectiveosgi.lib.functional.MapEntry Maven / Gradle / Ivy
The newest version!
package com.effectiveosgi.lib.functional;
import java.util.Map;
public final class MapEntry implements Map.Entry {
private final K key;
private V value;
public MapEntry(K key, V value) {
this.key = key; this.value = value;
}
@Override
public K getKey() {
return key;
}
@Override
public V getValue() {
return value;
}
@Override
public V setValue(V value) {
V oldValue = this.value;
this.value = value;
return oldValue;
}
}