public class DisplayData extends Object implements Serializable
PTransforms that make up a pipeline.
Components specify their display data by implementing the HasDisplayData
interface.
| Modifier and Type | Class and Description |
|---|---|
static interface |
DisplayData.Builder
Utility to build up display data from a component and its included
subcomponents.
|
static class |
DisplayData.Identifier
Unique identifier for a display data item within a component.
|
static class |
DisplayData.Item<T>
Items are the unit of display data. |
static class |
DisplayData.Type
Display data type.
|
| Modifier and Type | Method and Description |
|---|---|
Map<DisplayData.Identifier,DisplayData.Item<?>> |
asMap() |
boolean |
equals(Object obj) |
static DisplayData |
from(HasDisplayData component)
Collect the
DisplayData from a component. |
int |
hashCode() |
static DisplayData.Type |
inferType(Object value)
Infer the
DisplayData.Type for the given object. |
static DisplayData.Item<Boolean> |
item(String key,
Boolean value)
Create a display item for the specified key and boolean value.
|
static <T> DisplayData.Item<Class<T>> |
item(String key,
Class<T> value)
Create a display item for the specified key and class value.
|
static <T> DisplayData.Item<T> |
item(String key,
DisplayData.Type type,
T value)
Create a display item for the specified key, type, and value.
|
static DisplayData.Item<Double> |
item(String key,
Double value)
Create a display item for the specified key and floating point value.
|
static DisplayData.Item<Duration> |
item(String key,
Duration value)
Create a display item for the specified key and duration value.
|
static DisplayData.Item<Float> |
item(String key,
Float value)
Create a display item for the specified key and floating point value.
|
static DisplayData.Item<Instant> |
item(String key,
Instant value)
Create a display item for the specified key and timestamp value.
|
static DisplayData.Item<Integer> |
item(String key,
Integer value)
Create a display item for the specified key and integer value.
|
static DisplayData.Item<Long> |
item(String key,
Long value)
Create a display item for the specified key and integer value.
|
static DisplayData.Item<String> |
item(String key,
String value)
Create a display item for the specified key and string value.
|
Collection<DisplayData.Item<?>> |
items() |
static DisplayData |
none()
Default empty
DisplayData instance. |
String |
toString() |
public static DisplayData none()
DisplayData instance.public static DisplayData from(HasDisplayData component)
DisplayData from a component. This will traverse all subcomponents
specified via DisplayData.Builder.include(org.apache.beam.sdk.transforms.display.HasDisplayData) in the given component. Data in this component will be in
a namespace derived from the component.@Nullable public static DisplayData.Type inferType(@Nullable Object value)
DisplayData.Type for the given object.
Use this method if the type of metadata is not known at compile time. For example:
{@codeDisplayData.Type, or null if the type cannot be inferred,public Collection<DisplayData.Item<?>> items()
public Map<DisplayData.Identifier,DisplayData.Item<?>> asMap()
public static DisplayData.Item<String> item(String key, @Nullable String value)
public static DisplayData.Item<Integer> item(String key, @Nullable Integer value)
public static DisplayData.Item<Long> item(String key, @Nullable Long value)
public static DisplayData.Item<Float> item(String key, @Nullable Float value)
public static DisplayData.Item<Double> item(String key, @Nullable Double value)
public static DisplayData.Item<Boolean> item(String key, @Nullable Boolean value)
public static DisplayData.Item<Instant> item(String key, @Nullable Instant value)
public static DisplayData.Item<Duration> item(String key, @Nullable Duration value)
public static <T> DisplayData.Item<Class<T>> item(String key, @Nullable Class<T> value)
public static <T> DisplayData.Item<T> item(String key, DisplayData.Type type, @Nullable T value)
HasDisplayData implementors should call one of the typed factory methods, such as
item(String, String) or item(String, Integer).ClassCastException - if the value cannot be formatted as the given type.inferType(Object)