Class StringPair
- java.lang.Object
-
- org.neotropic.kuwaiba.core.apis.persistence.util.StringPair
-
- All Implemented Interfaces:
Serializable
public class StringPair extends Object implements Serializable
A StringPair mimics the behavior of a HashSet<String, String> entry, but with a webservice-friendly implementation. A normal HashMap is serialized in a weird way. The typical use case for this class is when you need to provide a set of parameters in a key-value fashion- Author:
- Charles Edward Bedon Cortazar <charles.bedon@kuwaiba.org>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StringPair()
Arg-less constructor is requiredStringPair(String key, String value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HashMap<String,String>
asHashMap(List<StringPair> theList)
Converts aStringPair
list to aHashMap
.static String
get(List<StringPair> listOfStringPairs, String key)
String
getKey()
String
getValue()
void
setKey(String key)
void
setValue(String value)
-
-
-
Method Detail
-
getKey
public String getKey()
-
setKey
public void setKey(String key)
-
getValue
public String getValue()
-
setValue
public void setValue(String value)
-
get
public static final String get(List<StringPair> listOfStringPairs, String key)
-
asHashMap
public static HashMap<String,String> asHashMap(List<StringPair> theList)
Converts aStringPair
list to aHashMap
.- Parameters:
theList
- The list to be converted.- Returns:
-
-