Module org.junit.platform.engine
Package org.junit.platform.engine
Class DiscoverySelectorIdentifier
java.lang.Object
org.junit.platform.engine.DiscoverySelectorIdentifier
@API(status=EXPERIMENTAL,
since="1.11")
public final class DiscoverySelectorIdentifier
extends Object
Identifier for a
DiscoverySelector
with a specific prefix.
The string representation of an identifier is
intended to be human-readable and is formatted as prefix:value
.
- Since:
- 1.11
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic DiscoverySelectorIdentifier
Create a newDiscoverySelectorIdentifier
with the supplied prefix and value.boolean
Get the prefix of this identifier.getValue()
Get the value of this identifier.int
hashCode()
static DiscoverySelectorIdentifier
Parse the supplied string representation of aDiscoverySelectorIdentifier
in the formatprefix:value
.toString()
Get the string representation of this identifier in the formatprefix:value
.
-
Method Details
-
create
Create a newDiscoverySelectorIdentifier
with the supplied prefix and value.- Parameters:
prefix
- the prefix; nevernull
or blankvalue
- the value; nevernull
or blank
-
parse
Parse the supplied string representation of aDiscoverySelectorIdentifier
in the formatprefix:value
.- Parameters:
string
- the string representation of aDiscoverySelectorIdentifier
- Returns:
- the parsed
DiscoverySelectorIdentifier
- Throws:
PreconditionViolationException
- if the supplied string does not conform to the expected format
-
getPrefix
Get the prefix of this identifier.- Returns:
- the prefix; never
null
or blank
-
getValue
Get the value of this identifier.- Returns:
- the value; never
null
or blank
-
equals
-
hashCode
public int hashCode() -
toString
Get the string representation of this identifier in the formatprefix:value
.
-