键值对

/**
* 键值对
*
* @author vernon.chen
*
*/
public class KeyValuePair2<K, V> {

private static Logger logger = LoggerFactory.getLogger(KeyValuePair2.class);

private K key;

private V value;

public KeyValuePair2() {
super();
}

public KeyValuePair2(K key, V value) {
super();
this.key = key;
this.value = value;
}

public K getKey() {
return key;
}

public void setKey(K key) {
this.key = key;
}

public V getValue() {
return value;
}

public void setValue(V value) {
this.value = value;
}

public static void main(String[] args) {
KeyValuePair2<String, String> kv2 = new KeyValuePair2<String, String>();
kv2.setKey("key");
kv2.setValue("value");

logger.debug(kv2.getKey());
logger.debug(kv2.getValue());

}
}

你可能感兴趣的:(值)