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

public final Class ReportEntry

extends Object
Class Inheritance
Annotations
@API
status:STABLE
since:1.0
Static Imports
org.apiguardian.api.API.Status.STABLE

ReportEntry encapsulates a time-stamped map of String-based key-value pairs to be published to the reporting infrastructure.
Since
1.0
See Also
from(Map), from(String, String)

Field Summary

Modifier and TypeField and Description
private final Map<String, String>
private final LocalDateTime

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private void
add(String key, String value)

public static ReportEntry
from(Map<String, String>
the map of key-value pairs to be published; never null; keys and values within entries in the map also must not be null or blank
keyValuePairs
)

Factory for creating a new ReportEntry from a map of key-value pairs.

public static ReportEntry
from(String
the key under which the value should published; never null or blank
key
,
String
the value to publish; never null or blank
value
)

Factory for creating a new ReportEntry from a key-value pair.

public Map<String, String>

Returns:

a copy of the map of key-value pairs; never null
getKeyValuePairs
()

Get an unmodifiable copy of the map of key-value pairs to be published.

public LocalDateTime

Returns:

when this entry was created; never null
getTimestamp
()

Get the timestamp for when this ReportEntry was created.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

keyValuePairsback to summary
private final Map<String, String> keyValuePairs
timestampback to summary
private final LocalDateTime timestamp

Constructor Detail

ReportEntryback to summary
private ReportEntry()

Method Detail

addback to summary
private void add(String key, String value)
fromback to summary
public static ReportEntry from(Map<String, String> keyValuePairs)

Factory for creating a new ReportEntry from a map of key-value pairs.

Parameters
keyValuePairs:Map<String, String>

the map of key-value pairs to be published; never null; keys and values within entries in the map also must not be null or blank

fromback to summary
public static ReportEntry from(String key, String value)

Factory for creating a new ReportEntry from a key-value pair.

Parameters
key:String

the key under which the value should published; never null or blank

value:String

the value to publish; never null or blank

getKeyValuePairsback to summary
public Map<String, String> getKeyValuePairs()

Get an unmodifiable copy of the map of key-value pairs to be published.

Returns:Map<String, String>

a copy of the map of key-value pairs; never null

getTimestampback to summary
public LocalDateTime getTimestamp()

Get the timestamp for when this ReportEntry was created.

Can be used, for example, to order entries.

Returns:LocalDateTime

when this entry was created; never null

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override