Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Pair <K,V> {
- private final K key; //non modifiable
- private V value;
- //constructeur
- public Pair(K k, V v){
- key = k;
- value = v;
- }
- public K getKey() {
- return key;
- }
- public V getValue() {
- return value;
- }
- //Modifie la valeur
- public V setV(V v){ //ou void
- value =v;
- return v;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement