ResourceBuilders.Resources.Builder

public final class ResourceBuilders.Resources.Builder


Builder for Resources

Summary

Public methods

@NonNull ResourceBuilders.Resources.Builder

Adds an entry into a map of resource_ids to images, which can be used by layouts.

@NonNull ResourceBuilders.Resources.Builder

Adds an entry into a map of resource_ids to images, which can be used by layouts.

@NonNull ResourceBuilders.Resources

Builds an instance from accumulated values.

@NonNull ResourceBuilders.Resources.Builder

Sets the version of this Resources instance.

Public methods

addIdToImageMapping

@NonNull
public ResourceBuilders.Resources.Builder addIdToImageMapping(
    @NonNull String id,
    @NonNull ResourceBuilders.ImageResource image
)

Adds an entry into a map of resource_ids to images, which can be used by layouts.

addIdToImageMapping

@NonNull
public ResourceBuilders.Resources.Builder addIdToImageMapping(
    @NonNull String id,
    @NonNull ResourceBuilders.ImageResource.Builder imageBuilder
)

Adds an entry into a map of resource_ids to images, which can be used by layouts.

build

@NonNull
public ResourceBuilders.Resources build()

Builds an instance from accumulated values.

setVersion

@NonNull
public ResourceBuilders.Resources.Builder setVersion(@NonNull String version)

Sets the version of this Resources instance.

Each tile specifies the version of resources it requires. After fetching a tile, the renderer will use the resources version specified by the tile to separately fetch the resources.

This value must match the version of the resources required by the tile for the tile to render successfully, and must match the resource version specified in which triggered this request.