public class Tag
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
A tag consisting of a name/value pair for a resource.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
key
The key, or name, for the resource tag.
|
private java.lang.String |
value
The value for the resource tag.
|
Constructor and Description |
---|
Tag() |
Modifier and Type | Method and Description |
---|---|
Tag |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getKey()
The key, or name, for the resource tag.
|
java.lang.String |
getValue()
The value for the resource tag.
|
int |
hashCode() |
void |
setKey(java.lang.String key)
The key, or name, for the resource tag.
|
void |
setValue(java.lang.String value)
The value for the resource tag.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Tag |
withKey(java.lang.String key)
The key, or name, for the resource tag.
|
Tag |
withValue(java.lang.String value)
The value for the resource tag.
|
private java.lang.String key
The key, or name, for the resource tag.
private java.lang.String value
The value for the resource tag.
public void setKey(java.lang.String key)
The key, or name, for the resource tag.
key
- The key, or name, for the resource tag.public java.lang.String getKey()
The key, or name, for the resource tag.
public Tag withKey(java.lang.String key)
The key, or name, for the resource tag.
key
- The key, or name, for the resource tag.public void setValue(java.lang.String value)
The value for the resource tag.
value
- The value for the resource tag.public java.lang.String getValue()
The value for the resource tag.
public Tag withValue(java.lang.String value)
The value for the resource tag.
value
- The value for the resource tag.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Tag clone()
clone
in class java.lang.Object