Builder
Builder class for constructing SimulationState instances using a fluent API.
Provides a convenient way to incrementally build complex simulation states by adding entities one at a time or in groups. The builder pattern ensures that all required components can be configured before creating the final immutable state.
Value parameters
- customers
-
current collection of customer entities
- games
-
current collection of game entities
- spawner
-
optional spawner entity
- walls
-
current collection of wall entities
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Adds a single customer to the existing collection.
Adds a single customer to the existing collection.
Value parameters
- customer
-
the customer entity to add
Attributes
- Returns
-
updated builder with the additional customer
Adds a single game to the existing collection.
Adds a single game to the existing collection.
Games are prepended to the list for efficient insertion.
Value parameters
- game
-
the game entity to add
Attributes
- Returns
-
updated builder with the additional game
Adds a single wall to the existing collection.
Adds a single wall to the existing collection.
Walls are prepended to the list for efficient insertion.
Value parameters
- wall
-
the wall entity to add
Attributes
- Returns
-
updated builder with the additional wall
Constructs the final SimulationState from the current builder configuration.
Constructs the final SimulationState from the current builder configuration.
Attributes
- Returns
-
immutable SimulationState with default ticker settings
Sets the complete collection of customers for the simulation.
Sets the complete collection of customers for the simulation.
Value parameters
- customers
-
the customer entities to include
Attributes
- Returns
-
updated builder with the specified customers
Sets the complete collection of games for the simulation.
Sets the complete collection of games for the simulation.
Value parameters
- games
-
the game entities to include
Attributes
- Returns
-
updated builder with the specified games
Sets the spawner for the simulation.
Sets the spawner for the simulation.
Value parameters
- spawner
-
the spawner entity to use for customer creation
Attributes
- Returns
-
updated builder with the specified spawner
Sets the complete collection of walls for the simulation.
Sets the complete collection of walls for the simulation.
Value parameters
- walls
-
the wall entities to include for boundary definition
Attributes
- Returns
-
updated builder with the specified walls
Removes the spawner from the simulation configuration.
Removes the spawner from the simulation configuration.
Attributes
- Returns
-
updated builder with no spawner
Inherited methods
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product