@NotThreadSafe public static final class ImmutableDsDataBlock.Builder extends Object
ImmutableDsDataBlock.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Modifier and Type | Method and Description |
|---|---|
ImmutableDsDataBlock.Builder |
addAllData(Iterable<? extends DsDataPoint> elements)
Adds elements to
data list. |
ImmutableDsDataBlock.Builder |
addData(DsDataPoint... elements)
Adds elements to
data list. |
ImmutableDsDataBlock.Builder |
addData(DsDataPoint element)
Adds one element to
data list. |
ImmutableDsDataBlock |
build()
Builds a new
ImmutableDsDataBlock. |
ImmutableDsDataBlock.Builder |
data(Iterable<? extends DsDataPoint> elements)
Sets or replaces all elements for
data list. |
ImmutableDsDataBlock.Builder |
from(DsDataBlock instance)
Fill a builder with attribute values from the provided
DsDataBlock instance. |
ImmutableDsDataBlock.Builder |
icon(DsIcon icon)
Initializes the value for the
icon attribute. |
ImmutableDsDataBlock.Builder |
summary(String summary)
Initializes the value for the
summary attribute. |
public final ImmutableDsDataBlock.Builder from(DsDataBlock instance)
DsDataBlock instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableDsDataBlock.Builder summary(@Nullable String summary)
summary attribute.summary - The value for summary (can be null)this builder for use in a chained invocationpublic final ImmutableDsDataBlock.Builder icon(@Nullable DsIcon icon)
icon attribute.icon - The value for icon (can be null)this builder for use in a chained invocationpublic final ImmutableDsDataBlock.Builder addData(DsDataPoint element)
data list.element - A data elementthis builder for use in a chained invocationpublic final ImmutableDsDataBlock.Builder addData(DsDataPoint... elements)
data list.elements - An array of data elementsthis builder for use in a chained invocationpublic final ImmutableDsDataBlock.Builder data(Iterable<? extends DsDataPoint> elements)
data list.elements - An iterable of data elementsthis builder for use in a chained invocationpublic final ImmutableDsDataBlock.Builder addAllData(Iterable<? extends DsDataPoint> elements)
data list.elements - An iterable of data elementsthis builder for use in a chained invocationpublic ImmutableDsDataBlock build()
ImmutableDsDataBlock.IllegalStateException - if any required attributes are missingCopyright © 2016–2020. All rights reserved.