@API(value=Experimental) public final class TestTag extends Object implements Serializable
isValid(String)
,
create(String)
,
Serialized FormModifier and Type | Method and Description |
---|---|
static TestTag |
create(String name)
Create a
TestTag from the supplied name . |
boolean |
equals(Object obj) |
String |
getName()
Get the name of this tag.
|
int |
hashCode() |
static boolean |
isValid(String name)
Determine if the supplied tag name is valid with regard to the supported
syntax for tags.
|
String |
toString() |
public static boolean isValid(String name)
null
.If this method returns true
for a given name, it is then a
valid candidate for the create()
factory
method.
name
- the name of the tag to validate; may be null
or blanktrue
if the supplied tag name conforms to the supported
syntax for tagsStringUtils.isNotBlank(String)
,
String.trim()
,
StringUtils.doesNotContainWhitespace(String)
,
StringUtils.doesNotContainIsoControlCharacter(String)
,
create(String)
public static TestTag create(String name) throws PreconditionViolationException
TestTag
from the supplied name
.
Consider checking whether the syntax of the supplied name
is valid before attempting to create a
TestTag
using this factory method.
Note: the supplied name
will be trimmed.
name
- the name of the tag; must be syntactically validPreconditionViolationException
- if the supplied tag name is not
syntactically validisValid(String)
public String getName()
null
or blank