GridSize

floodsim.model.state.GridSize
object GridSize

Type-safe representation of a grid size value. Ensures that grid size values are always positive and within reasonable limits.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
GridSize.type

Members list

Type members

Types

opaque type GridSize

Opaque type to represent a grid size value.

Opaque type to represent a grid size value.

Attributes

Value members

Concrete methods

def apply(size: Int): GridSize

Creates a new grid size value.

Creates a new grid size value.

Value parameters

size

the grid size (must be positive and <= 50)

Attributes

Returns

a new GridSize instance

Throws
IllegalArgumentException

if the size is outside the valid range

Extensions

Extensions

extension (gs: GridSize)
def value: Int

Returns the grid size value.

Returns the grid size value.

Attributes