indigo.shared.collections

Type members

Classlikes

sealed trait Batch[+A]

Batch is a really thin wrapper over js.Array to replace List on the Indigo APIs. Its purpose is to provide fast scene construction and fast conversion back to js.Array for the engine to use. Most operations that require any sort of traversal are performed by flattening the structure and delegated to js.Array. In practice, scene construction is mostly about building the structure, so the penalty is acceptable, and still faster than using List.

Batch is a really thin wrapper over js.Array to replace List on the Indigo APIs. Its purpose is to provide fast scene construction and fast conversion back to js.Array for the engine to use. Most operations that require any sort of traversal are performed by flattening the structure and delegated to js.Array. In practice, scene construction is mostly about building the structure, so the penalty is acceptable, and still faster than using List.

Companion:
object
object Batch
Companion:
class
final case class NonEmptyBatch[A](head: A, tail: Batch[A])

An ordered batch-type object that requires there to always be at least one element present, ruling out the possibility of unsafely accessing the head element.

An ordered batch-type object that requires there to always be at least one element present, ruling out the possibility of unsafely accessing the head element.

Type parameters:
A

The type of element to be stored in the batch.

Companion:
object
Companion:
class
final case class NonEmptyList[A](head: A, tail: List[A])

An ordered list-type object that requires there to always be at least one element present, ruling out the possibility of unsafely accessing the head element.

An ordered list-type object that requires there to always be at least one element present, ruling out the possibility of unsafely accessing the head element.

Type parameters:
A

The type of element to be stored in the list.

Companion:
object
Companion:
class