Top Description Fields Constructors Methods
org.junit.platform.engine

pack-priv Class UniqueIdFormat

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Static Imports
java.util.stream.Collectors.joining

Used to parse a UniqueId from a string representation or to format a UniqueId into a string representation.
Since
1.0

Field Summary

Modifier and TypeField and Description
private final char
private static final UniqueIdFormat
private final HashMap<Character, String>
private final char
private final char
private final Pattern
private static final long
private final char

Constructor Summary

AccessConstructor and Description
pack-priv
UniqueIdFormat(char openSegment, char typeValueSeparator, char closeSegment, char segmentDelimiter)

Method Summary

Modifier and TypeMethod and Description
private String
checkAllowed(String typeOrValue)

private void
checkDoesNotContain(String typeOrValue, char forbiddenCharacter)

private UniqueId.Segment
createSegment(String segmentString)

private static String
private String
private static String
encode(char c)

private String
pack-priv String
format(UniqueId uniqueId)

Format and return the string representation of the supplied UniqueId.

pack-priv static UniqueIdFormat
pack-priv UniqueId

Returns:

a properly constructed UniqueId
parse
(String source)

Parse a UniqueId from the supplied string representation.

private static String
quote(char c)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

closeSegmentback to summary
private final char closeSegment
defaultFormatback to summary
private static final UniqueIdFormat defaultFormat
encodedCharacterMapback to summary
private final HashMap<Character, String> encodedCharacterMap
openSegmentback to summary
private final char openSegment
segmentDelimiterback to summary
private final char segmentDelimiter
segmentPatternback to summary
private final Pattern segmentPattern
serialVersionUIDback to summary
private static final long serialVersionUID
Annotations
@Serial
typeValueSeparatorback to summary
private final char typeValueSeparator

Constructor Detail

UniqueIdFormatback to summary
pack-priv UniqueIdFormat(char openSegment, char typeValueSeparator, char closeSegment, char segmentDelimiter)

Method Detail

checkAllowedback to summary
private String checkAllowed(String typeOrValue)
checkDoesNotContainback to summary
private void checkDoesNotContain(String typeOrValue, char forbiddenCharacter)
createSegmentback to summary
private UniqueId.Segment createSegment(String segmentString) throws JUnitException
decodeback to summary
private static String decode(String s)
describeback to summary
private String describe(UniqueId.Segment segment)
encodeback to summary
private static String encode(char c)
encodeback to summary
private String encode(String s)
formatback to summary
pack-priv String format(UniqueId uniqueId)

Format and return the string representation of the supplied UniqueId.

getDefaultback to summary
pack-priv static UniqueIdFormat getDefault()
parseback to summary
pack-priv UniqueId parse(String source) throws JUnitException

Parse a UniqueId from the supplied string representation.

Returns:UniqueId

a properly constructed UniqueId

Exceptions
JUnitException:
if the string cannot be parsed
quoteback to summary
private static String quote(char c)