TilePreviewData


public final class TilePreviewData


Container class storing data required to render previews for methods annotated with Preview.

Summary

Public constructors

TilePreviewData(
    @NonNull Function1<@NonNull RequestBuilders.ResourcesRequest, @NonNull ResourceBuilders.Resources> onTileResourceRequest,
    PlatformDataValues platformDataValues,
    @NonNull Function1<@NonNull RequestBuilders.TileRequest, @NonNull TileBuilders.Tile> onTileRequest
)

Public methods

boolean
equals(Object other)
final @NonNull Function1<@NonNull RequestBuilders.TileRequest, @NonNull TileBuilders.Tile>

callback that provides the TileBuilders.Tile to be previewed.

final @NonNull Function1<@NonNull RequestBuilders.ResourcesRequest, @NonNull ResourceBuilders.Resources>

callback that provides a Resources.

final PlatformDataValues

allows overriding platform data values for any PlatformDataKey.

int
@NonNull String

Public constructors

TilePreviewData

Added in 1.4.0
public TilePreviewData(
    @NonNull Function1<@NonNull RequestBuilders.ResourcesRequest, @NonNull ResourceBuilders.Resources> onTileResourceRequest,
    PlatformDataValues platformDataValues,
    @NonNull Function1<@NonNull RequestBuilders.TileRequest, @NonNull TileBuilders.Tile> onTileRequest
)
Parameters
@NonNull Function1<@NonNull RequestBuilders.ResourcesRequest, @NonNull ResourceBuilders.Resources> onTileResourceRequest

callback that provides a Resources. It will be called before rendering the preview of the TileBuilders.Tile. By default, this callback will return a Resources with the version "0".

PlatformDataValues platformDataValues

allows overriding platform data values for any PlatformDataKey. Default platform data values will be set for all platform health sources that have not been overridden.

@NonNull Function1<@NonNull RequestBuilders.TileRequest, @NonNull TileBuilders.Tile> onTileRequest

callback that provides the TileBuilders.Tile to be previewed. It will be called before rendering the preview.

Public methods

equals

public boolean equals(Object other)

getOnTileRequest

Added in 1.3.0
public final @NonNull Function1<@NonNull RequestBuilders.TileRequest, @NonNull TileBuilders.TilegetOnTileRequest()

callback that provides the TileBuilders.Tile to be previewed. It will be called before rendering the preview.

getOnTileResourceRequest

Added in 1.3.0
public final @NonNull Function1<@NonNull RequestBuilders.ResourcesRequest, @NonNull ResourceBuilders.ResourcesgetOnTileResourceRequest()

callback that provides a Resources. It will be called before rendering the preview of the TileBuilders.Tile. By default, this callback will return a Resources with the version "0".

getPlatformDataValues

Added in 1.4.0
public final PlatformDataValues getPlatformDataValues()

allows overriding platform data values for any PlatformDataKey. Default platform data values will be set for all platform health sources that have not been overridden.

hashCode

public int hashCode()

toString

public @NonNull String toString()