@Immutable public abstract class TagValue extends Object
Validation ensures that the String
has a maximum length of MAX_LENGTH
and
contains only printable ASCII characters.
Modifier and Type | Field and Description |
---|---|
static int |
MAX_LENGTH
The maximum length for a tag value.
|
Modifier and Type | Method and Description |
---|---|
abstract String |
asString()
Returns the tag value as a
String . |
static TagValue |
create(String value)
Constructs a
TagValue from the given string. |
public static final int MAX_LENGTH
public static TagValue create(String value)
TagValue
from the given string. The string must meet the following
requirements:
MAX_LENGTH
.
value
- the tag value.IllegalArgumentException
- if the String
is not valid.public abstract String asString()
String
.String
.