@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableDsDataBlock extends Object implements DsDataBlock
DsDataBlock.
Use the builder to create immutable instances:
ImmutableDsDataBlock.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableDsDataBlock.Builder
Builds instances of type
ImmutableDsDataBlock. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableDsDataBlock.Builder |
builder()
Creates a builder for
ImmutableDsDataBlock. |
static ImmutableDsDataBlock |
copyOf(DsDataBlock instance)
Creates an immutable copy of a
DsDataBlock value. |
List<DsDataPoint> |
data()
A list of
DsDataPoint instances, ordered by time, which together describe
the weather conditions at the requested location over time. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableDsDataBlock that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
summary, icon, data. |
DsIcon |
icon()
A machine-readable text summary of this data block.
|
String |
summary()
A human-readable summary of this data block.
|
String |
toString()
Prints the immutable value
DsDataBlock with attribute values. |
ImmutableDsDataBlock |
withData(DsDataPoint... elements)
Copy the current immutable object with elements that replace the content of
data. |
ImmutableDsDataBlock |
withData(Iterable<? extends DsDataPoint> elements)
Copy the current immutable object with elements that replace the content of
data. |
ImmutableDsDataBlock |
withIcon(DsIcon value)
Copy the current immutable object by setting a value for the
icon attribute. |
ImmutableDsDataBlock |
withSummary(String value)
Copy the current immutable object by setting a value for the
summary attribute. |
@Nullable public String summary()
summary in interface DsDataBlock@Nullable public DsIcon icon()
DsDataPoint.icon().)icon in interface DsDataBlockpublic List<DsDataPoint> data()
DsDataPoint instances, ordered by time, which together describe
the weather conditions at the requested location over time.data in interface DsDataBlockpublic final ImmutableDsDataBlock withSummary(@Nullable String value)
summary attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for summary (can be null)this objectpublic final ImmutableDsDataBlock withIcon(@Nullable DsIcon value)
icon attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for icon (can be null)this objectpublic final ImmutableDsDataBlock withData(DsDataPoint... elements)
data.elements - The elements to setthis objectpublic final ImmutableDsDataBlock withData(Iterable<? extends DsDataPoint> elements)
data.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of data elements to setthis objectpublic boolean equals(@Nullable Object another)
ImmutableDsDataBlock that have equal attribute values.public int hashCode()
summary, icon, data.public String toString()
DsDataBlock with attribute values.public static ImmutableDsDataBlock copyOf(DsDataBlock instance)
DsDataBlock value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableDsDataBlock.Builder builder()
ImmutableDsDataBlock.
ImmutableDsDataBlock.builder()
.summary(String | null) // nullable summary
.icon(ch.rasc.darksky.model.DsIcon | null) // nullable icon
.addData|addAllData(ch.rasc.darksky.model.DsDataPoint) // data elements
.build();
Copyright © 2016–2020. All rights reserved.