@API(status=STABLE,
since="1.0")
public final class ReportEntry
extends java.lang.Object
ReportEntry encapsulates a time-stamped map of String-based
key-value pairs to be published to the reporting infrastructure.from(Map),
from(String, String)| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<java.lang.String,java.lang.String> |
keyValuePairs |
private java.time.LocalDateTime |
timestamp |
| Constructor and Description |
|---|
ReportEntry() |
| Modifier and Type | Method and Description |
|---|---|
private void |
add(java.lang.String key,
java.lang.String value) |
static ReportEntry |
from(java.util.Map<java.lang.String,java.lang.String> keyValuePairs)
Factory for creating a new
ReportEntry from a map of key-value pairs. |
static ReportEntry |
from(java.lang.String key,
java.lang.String value)
Factory for creating a new
ReportEntry from a key-value pair. |
java.util.Map<java.lang.String,java.lang.String> |
getKeyValuePairs()
Get an unmodifiable copy of the map of key-value pairs to be published.
|
java.time.LocalDateTime |
getTimestamp()
Get the timestamp for when this
ReportEntry was created. |
java.lang.String |
toString() |
private final java.time.LocalDateTime timestamp
private final java.util.Map<java.lang.String,java.lang.String> keyValuePairs
public static ReportEntry from(java.util.Map<java.lang.String,java.lang.String> keyValuePairs)
ReportEntry from a map of key-value pairs.keyValuePairs - 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 blankpublic static ReportEntry from(java.lang.String key, java.lang.String value)
ReportEntry from a key-value pair.key - the key under which the value should published; never
null or blankvalue - the value to publish; never null or blankprivate void add(java.lang.String key,
java.lang.String value)
public final java.util.Map<java.lang.String,java.lang.String> getKeyValuePairs()
nullpublic final java.time.LocalDateTime getTimestamp()
ReportEntry was created.
Can be used, for example, to order entries.
nullpublic java.lang.String toString()
toString in class java.lang.Object