public class Tag
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Each tag includes the following elements.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
key
The key (name) of a tag.
|
private java.lang.String |
value
The value of a 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 (name) of a tag.
|
java.lang.String |
getValue()
The value of a tag.
|
int |
hashCode() |
void |
setKey(java.lang.String key)
The key (name) of a tag.
|
void |
setValue(java.lang.String value)
The value of a 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 (name) of a tag.
|
Tag |
withValue(java.lang.String value)
The value of a tag.
|
private java.lang.String key
The key (name) of a tag.
Type: String
Default: None
Valid values: A-Z, a-z, 0-9, space, ".:/=+\-@"
Constraints: Each key can be 1-128 characters long.
Required: Yes
private java.lang.String value
The value of a tag.
Type: String
Default: None
Valid values: A-Z, a-z, 0-9, space, ".:/=+\-@"
Constraints: Each value can be 0-256 characters long.
Required: Yes
public void setKey(java.lang.String key)
The key (name) of a tag.
Type: String
Default: None
Valid values: A-Z, a-z, 0-9, space, ".:/=+\-@"
Constraints: Each key can be 1-128 characters long.
Required: Yes
key
- The key (name) of a tag.
Type: String
Default: None
Valid values: A-Z, a-z, 0-9, space, ".:/=+\-@"
Constraints: Each key can be 1-128 characters long.
Required: Yes
public java.lang.String getKey()
The key (name) of a tag.
Type: String
Default: None
Valid values: A-Z, a-z, 0-9, space, ".:/=+\-@"
Constraints: Each key can be 1-128 characters long.
Required: Yes
Type: String
Default: None
Valid values: A-Z, a-z, 0-9, space, ".:/=+\-@"
Constraints: Each key can be 1-128 characters long.
Required: Yes
public Tag withKey(java.lang.String key)
The key (name) of a tag.
Type: String
Default: None
Valid values: A-Z, a-z, 0-9, space, ".:/=+\-@"
Constraints: Each key can be 1-128 characters long.
Required: Yes
key
- The key (name) of a tag.
Type: String
Default: None
Valid values: A-Z, a-z, 0-9, space, ".:/=+\-@"
Constraints: Each key can be 1-128 characters long.
Required: Yes
public void setValue(java.lang.String value)
The value of a tag.
Type: String
Default: None
Valid values: A-Z, a-z, 0-9, space, ".:/=+\-@"
Constraints: Each value can be 0-256 characters long.
Required: Yes
value
- The value of a tag.
Type: String
Default: None
Valid values: A-Z, a-z, 0-9, space, ".:/=+\-@"
Constraints: Each value can be 0-256 characters long.
Required: Yes
public java.lang.String getValue()
The value of a tag.
Type: String
Default: None
Valid values: A-Z, a-z, 0-9, space, ".:/=+\-@"
Constraints: Each value can be 0-256 characters long.
Required: Yes
Type: String
Default: None
Valid values: A-Z, a-z, 0-9, space, ".:/=+\-@"
Constraints: Each value can be 0-256 characters long.
Required: Yes
public Tag withValue(java.lang.String value)
The value of a tag.
Type: String
Default: None
Valid values: A-Z, a-z, 0-9, space, ".:/=+\-@"
Constraints: Each value can be 0-256 characters long.
Required: Yes
value
- The value of a tag.
Type: String
Default: None
Valid values: A-Z, a-z, 0-9, space, ".:/=+\-@"
Constraints: Each value can be 0-256 characters long.
Required: Yes
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