com.afrigis.services.KeyValue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
Core Java library to ease use of AfriGIS Services
package com.afrigis.services;
/**
*
* Object used to store key/value pairs in the parameter list of SaasClient.
*
*
* @author sydney
*
*/
public class KeyValue {
private String key;
private String value;
/**
*
* Instantiate a key/value pair with values set.
*
*
* @param theKey
* The key name
* @param theValue
* The key value
*/
public KeyValue(String theKey, String theValue) {
this.key = theKey;
this.value = theValue;
}
/**
*
* Create an empty key/value pair, if values are to be determined later.
*
*/
public KeyValue() {
this.key = "";
this.value = "";
}
/**
*
* Retrieves teh key name.
*
*
* @return The key name
*/
public String getKey() {
return key;
}
/**
*
* Sets the key name.
*
*
* @param theKey
* The key name
*/
public void setKey(String theKey) {
this.key = theKey;
}
/**
*
* Retrieves the value.
*
*
* @return The key value
*/
public String getValue() {
return value;
}
/**
*
* Sets the value for this key.
*
*
* @param theVal
* The key value
*/
public void setValue(String theVal) {
this.value = theVal;
}
@Override
public String toString() {
final StringBuilder builder = new StringBuilder();
builder.append("KeyValue [key=");
builder.append(key);
builder.append(", value=");
builder.append(value);
builder.append("]");
return builder.toString();
}
}