ResourceBuilders.Resources

public final class ResourceBuilders.Resources


The resources for a layout.

Summary

Public methods

static @NonNull ResourceBuilders.Resources.Builder

Returns a new Builder.

@NonNull Map<@NonNull String, @NonNull ResourceBuilders.ImageResource>

Gets a map of resource_ids to images, which can be used by layouts.

@NonNull String

Gets the version of this Resources instance.

Public methods

builder

@NonNull
public static ResourceBuilders.Resources.Builder builder()

Returns a new Builder.

getIdToImageMapping

@NonNull
public Map<@NonNull String, @NonNull ResourceBuilders.ImageResourcegetIdToImageMapping()

Gets a map of resource_ids to images, which can be used by layouts. Intended for testing purposes only.

getVersion

@NonNull
public String getVersion()

Gets 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. Intended for testing purposes only.