HCenArrOpt

final class HCenArrOpt[A <: AnyRef](val unsafeArr: Array[A]) extends AnyVal

An immutable Arr of Opt Tile data for a specific hex tile grid HGrid. This is specialised for OptRef[A]. The tileGrid can map the HCen coordinate of the tile to the index of the Arr. Hence most methods take an implicit HGrid hex grid parameter.

class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def apply(hc: HCen)(implicit grid: HGrid): A

Accesses element from Refs Arr. Only use this method where you are certain it is not null, or the consumer can deal with the null.

Accesses element from Refs Arr. Only use this method where you are certain it is not null, or the consumer can deal with the null.

def cFlatMapSomes[ArrT <: ArrImut[_]](f: (A, HCen) => ArrT)(implicit grid: HGrid, build: ArrTFlatBuilder[ArrT]): ArrT

Coordinate flatMap Somes. Maps and flattens each Some element with its associated HCen coordinate. It ignores the None values.

Coordinate flatMap Somes. Maps and flattens each Some element with its associated HCen coordinate. It ignores the None values.

def cForeachSome(f: (A, HCen) => Unit)(implicit grid: HGrid): Unit

coordinate-foreach-Some. Foreach Some element and its associated HCen coordinate applies the side effecting parameter function. It ignores the None values.

coordinate-foreach-Some. Foreach Some element and its associated HCen coordinate applies the side effecting parameter function. It ignores the None values.

def cMap[B, ArrT <: ArrImut[B]](fNone: => HCen => B)(fSome: (A, HCen) => B)(implicit grid: HGrid, build: ArrTBuilder[B, ArrT]): ArrT

Coordinate-map. Maps the this Arr of Opt values, with their respective HCen coordinates to an Arr of type B.

Coordinate-map. Maps the this Arr of Opt values, with their respective HCen coordinates to an Arr of type B.

def cMapNones[B, ArrT <: ArrImut[B]](f: HCen => B)(implicit grid: HGrid, build: ArrTBuilder[B, ArrT]): ArrT

Coordinate map Nones. Map the None values respective HCen coordinates of this HCenArrOpt to type B, the first type parameter. Returns an immutable Array based collection of type ArrT, the second type parameter.

Coordinate map Nones. Map the None values respective HCen coordinates of this HCenArrOpt to type B, the first type parameter. Returns an immutable Array based collection of type ArrT, the second type parameter.

def cMapSomes[B, ArrT <: ArrImut[B]](f: (A, HCen) => B)(implicit grid: HGrid, build: ArrTBuilder[B, ArrT]): ArrT

Coordinate map Somes. map the some values of this HcenArrOpt, with the respective Hcen coordinate to type B, the first type parameter B. Returns an immutable Array based collection of type ArrT, the second type parameter.

Coordinate map Somes. map the some values of this HcenArrOpt, with the respective Hcen coordinate to type B, the first type parameter B. Returns an immutable Array based collection of type ArrT, the second type parameter.

def clone: HCenArrOpt[A]
def length: Int
def map[B, ArrT <: ArrImut[B]](noneValue: => B)(f: A => B)(implicit grid: HGrid, build: ArrTBuilder[B, ArrT]): ArrT

Maps the this Arr of Opt values, without their respective Hcen coordinates to an Arr of type B. This method treats the HCenArrOpt class like a standard Arr or Array. It does not utilise the grid HGrid from which this HCenArr was created.

Maps the this Arr of Opt values, without their respective Hcen coordinates to an Arr of type B. This method treats the HCenArrOpt class like a standard Arr or Array. It does not utilise the grid HGrid from which this HCenArr was created.

def mapSomes[B, ArrT <: ArrImut[B]](f: A => B)(implicit build: ArrTBuilder[B, ArrT]): ArrT

Maps the Some values to type B by the parameter function. It ignores the None values. This method treats the HCenArr class like a standard Arr or Array. It does not utilise the grid HGrid from which this HCenArrOpt was created.

Maps the Some values to type B by the parameter function. It ignores the None values. This method treats the HCenArr class like a standard Arr or Array. It does not utilise the grid HGrid from which this HCenArrOpt was created.

def mutMove(hc1: HCen, hc2: HCen)(implicit grid: HGrid): Unit

Moves the object in the array location given by the 1st HCen to the 2nd HCen, by setting hc2 to the value of hc1 and setting hc1 to None.

Moves the object in the array location given by the 1st HCen to the 2nd HCen, by setting hc2 to the value of hc1 and setting hc1 to None.

def setAll(value: A): Unit
def setNone(hc: HCen)(implicit grid: HGridReg): Unit
def setSome(y: Int, c: Int, value: A)(implicit grid: HGridReg): Unit

Sets the Some value of the hex tile data at the specified row and column coordinate values. This is an imperative mutating operation.

Sets the Some value of the hex tile data at the specified row and column coordinate values. This is an imperative mutating operation.

def setSome(hc: HCen, value: A)(implicit grid: HGridReg): Unit

Sets the Some value of the hex tile data at the specified HCen coordinate. This is an imperative mutating operation.

Sets the Some value of the hex tile data at the specified HCen coordinate. This is an imperative mutating operation.

def setSomeNew(hc: HCen, value: A)(implicit grid: HGrid): HCenArrOpt[A]
def setSomes(triples: (Int, Int, A)*)(implicit grid: HGridReg): Unit

Sets the Some values of the hex tile data at the specified row and column coordinate values. This is an imperative mutating operation.

Sets the Some values of the hex tile data at the specified row and column coordinate values. This is an imperative mutating operation.

Concrete fields

val unsafeArr: Array[A]