BlockBuilder

data class BlockBuilder<T : Tile>(emptyTile: Maybe<T>, tiles: MutableMap<BlockTileType, T>) : Builder<Block<T>>

Builds Blocks. Has no Tiles for either sides by default. Setting an emptyTile is mandatory and has no default.

Constructors

BlockBuilder
Link copied to clipboard
common
fun <T : Tile> BlockBuilder(emptyTile: Maybe<T> = Maybe.empty(), tiles: MutableMap<BlockTileType, T> = mutableMapOf())

Types

Companion
Link copied to clipboard
common
object Companion

Functions

build
Link copied to clipboard
common
open override fun build(): Block<T>
Builds an object of type T.
copy
Link copied to clipboard
common
fun copy(emptyTile: Maybe<T> = Maybe.empty(), tiles: MutableMap<BlockTileType, T> = mutableMapOf()): BlockBuilder<T>
createCopy
Link copied to clipboard
common
open override fun createCopy(): BlockBuilder<T>
Creates a deep copy of this object.
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String
withBack
Link copied to clipboard
common
fun withBack(back: T): BlockBuilder<T>
withBottom
Link copied to clipboard
common
fun withBottom(bottom: T): BlockBuilder<T>
withContent
Link copied to clipboard
common
fun withContent(content: T): BlockBuilder<T>
withEmptyTile
Link copied to clipboard
common
fun withEmptyTile(tile: T): BlockBuilder<T>
withFront
Link copied to clipboard
common
fun withFront(front: T): BlockBuilder<T>
withLeft
Link copied to clipboard
common
fun withLeft(left: T): BlockBuilder<T>
withRight
Link copied to clipboard
common
fun withRight(right: T): BlockBuilder<T>
withTileOnAllSides
Link copied to clipboard
common
fun withTileOnAllSides(tile: T): BlockBuilder<T>
withTiles
Link copied to clipboard
common
fun withTiles(tiles: Map<BlockTileType, T>): BlockBuilder<T>
Overwrites the Tiles in this BlockBuilder with the given BlockTileType -> Tile mapping.
withTop
Link copied to clipboard
common
fun withTop(top: T): BlockBuilder<T>

Sources

(source)
Link copied to clipboard