public class Tag
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
A tag is a pair of key and value. The allowed characters in keys and values are letters, whitespace, and numbers, representable in UTF-8, and the characters '+', '-', '=', '.', '_', ':', and '/'.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
key
Tag key, a string.
|
private java.lang.String |
value
Value of the tag key.
|
Constructor and Description |
---|
Tag() |
Modifier and Type | Method and Description |
---|---|
Tag |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getKey()
Tag key, a string.
|
java.lang.String |
getValue()
Value of the tag key.
|
int |
hashCode() |
void |
setKey(java.lang.String key)
Tag key, a string.
|
void |
setValue(java.lang.String value)
Value of the tag key.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Tag |
withKey(java.lang.String key)
Tag key, a string.
|
Tag |
withValue(java.lang.String value)
Value of the tag key.
|
private java.lang.String key
Tag key, a string. The key must not start with "aws:".
private java.lang.String value
Value of the tag key.
public void setKey(java.lang.String key)
Tag key, a string. The key must not start with "aws:".
key
- Tag key, a string. The key must not start with "aws:".public java.lang.String getKey()
Tag key, a string. The key must not start with "aws:".
public Tag withKey(java.lang.String key)
Tag key, a string. The key must not start with "aws:".
key
- Tag key, a string. The key must not start with "aws:".public void setValue(java.lang.String value)
Value of the tag key.
value
- Value of the tag key.public java.lang.String getValue()
Value of the tag key.
public Tag withValue(java.lang.String value)
Value of the tag key.
value
- Value of the tag key.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