30 lines
459 B
Java
30 lines
459 B
Java
import java.util.Map;
|
|
|
|
public class Entree<K, V> implements Map.Entry<K, V> {
|
|
|
|
private K key;
|
|
private V value;
|
|
|
|
public Entree(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) {
|
|
this.value = value;
|
|
return value;
|
|
}
|
|
|
|
}
|