Google Cloud Dataflow SDK for Java, version 1.9.1
com.google.cloud.dataflow.sdk.transforms.display
Interface DisplayData.Builder
-
- Enclosing class:
- DisplayData
public static interface DisplayData.Builder
Utility to build up display data from a component and its included subcomponents.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description DisplayData.Builder
add(DisplayData.Item<?> item)
Register the given display item.<T> DisplayData.Builder
addIfNotDefault(DisplayData.Item<T> item, T defaultValue)
Register the given display item if the value is different than the specified default.DisplayData.Builder
addIfNotNull(DisplayData.Item<?> item)
Register the given display item if the value is not null.DisplayData.Builder
include(HasDisplayData subComponent)
Register display data from the specified subcomponent.DisplayData.Builder
include(HasDisplayData subComponent, Class<?> namespace)
Register display data from the specified subcomponent, overriding the namespace of subcomponent display items with the specified namespace.DisplayData.Builder
include(HasDisplayData subComponent, String namespace)
Register display data from the specified subcomponent, overriding the namespace of subcomponent display items with the specified namespace.
-
-
-
Method Detail
-
include
DisplayData.Builder include(HasDisplayData subComponent)
Register display data from the specified subcomponent. For example, aPTransform
which delegates to a user-provided function can implementHasDisplayData
on the function and include it from thePTransform
:@Override public void populateDisplayData(DisplayData.Builder builder) { super.populateDisplayData(builder); builder .add(DisplayData.item("userFn", userFn)) // To register the class name of the userFn .include(userFn); // To allow the userFn to register additional display data }
Using
include(subcomponent)
will associate each of the registered items with the namespace of thesubcomponent
being registered. To register display data in the current namespace, such as from a base class implementation, usesubcomponent.populateDisplayData(builder)
instead.
-
include
DisplayData.Builder include(HasDisplayData subComponent, Class<?> namespace)
Register display data from the specified subcomponent, overriding the namespace of subcomponent display items with the specified namespace.- See Also:
include(HasDisplayData)
-
include
DisplayData.Builder include(HasDisplayData subComponent, String namespace)
Register display data from the specified subcomponent, overriding the namespace of subcomponent display items with the specified namespace.- See Also:
include(HasDisplayData)
-
add
DisplayData.Builder add(DisplayData.Item<?> item)
Register the given display item.
-
addIfNotNull
DisplayData.Builder addIfNotNull(DisplayData.Item<?> item)
Register the given display item if the value is not null.
-
addIfNotDefault
<T> DisplayData.Builder addIfNotDefault(DisplayData.Item<T> item, @Nullable T defaultValue)
Register the given display item if the value is different than the specified default.
-
-