public class KeyValue extends Object implements Serializable, Cloneable
A key value pair.
Constructor and Description |
---|
KeyValue()
Default constructor for a new KeyValue object.
|
KeyValue(String key,
String value)
Constructs a new KeyValue object.
|
Modifier and Type | Method and Description |
---|---|
KeyValue |
clone() |
boolean |
equals(Object obj) |
String |
getKey()
The unique identifier of a key value pair.
|
String |
getValue()
The value part of the identified key.
|
int |
hashCode() |
void |
setKey(String key)
The unique identifier of a key value pair.
|
void |
setValue(String value)
The value part of the identified key.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
KeyValue |
withKey(String key)
The unique identifier of a key value pair.
|
KeyValue |
withValue(String value)
The value part of the identified key.
|
public KeyValue()
public String getKey()
Constraints:
Length: 0 - 10280
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
public void setKey(String key)
Constraints:
Length: 0 - 10280
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
key
- The unique identifier of a key value pair.public KeyValue withKey(String key)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 10280
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
key
- The unique identifier of a key value pair.public String getValue()
Constraints:
Length: 0 - 10280
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
public void setValue(String value)
Constraints:
Length: 0 - 10280
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
value
- The value part of the identified key.public KeyValue withValue(String value)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 10280
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
value
- The value part of the identified key.public String toString()
toString
in class Object
Object.toString()
Copyright © 2015. All rights reserved.