Closable

trait Closable extends Structure

A mixin that describe a Structure that can be closed.

trait Structure
class Object
trait Matchable
class Any

Type members

Inherited types

Type that describes the entity that interacts with the structure.

Type that describes the entity that interacts with the structure.

Inherited from:
Structure

Type that describes the type of the structure defined with types.

Type that describes the type of the structure defined with types.

Inherited from:
Structure

Type that describes an entity that is entered in the structure.

Type that describes an entity that is entered in the structure.

Inherited from:
Structure

Type that represents the position of the structure.

Type that represents the position of the structure.

Inherited from:
Structure

Type that represents a probability.

Type that represents a probability.

Inherited from:
Structure

Type that describes the time of the simulation.

Type that describes the time of the simulation.

Inherited from:
Structure

Type that represents the strategy used to chose if a entity can enter or not.

Type that represents the strategy used to chose if a entity can enter or not.

Inherited from:
Structure

Type that represents the time distribution used for the permanence.

Type that represents the time distribution used for the permanence.

Inherited from:
Structure

Value members

Abstract methods

def isOpen: Boolean

A closeable structure is a structure that can be closed. This method represent the state of the structure in that terms.

A closeable structure is a structure that can be closed. This method represent the state of the structure in that terms.

Returns:

true if it's open, false otherwise

Concrete methods

protected def checkEnter(entity: BaseEntity): Boolean

Inherited methods

def capacity: Int

Each structure has a capacity in terms of how many entities can be at the same time inside.

Each structure has a capacity in terms of how many entities can be at the same time inside.

Returns:

the maximum number of entity contained by the structure

Inherited from:
Structure
protected def enter(entity: BaseEntity, timestamp: SimulationTime): BaseStructure

Method that insert the entity inside the structure.

Method that insert the entity inside the structure.

Value parameters:
entity

the entity that want to enter

timestamp

the timestamp in which the entity is entered

Returns:

The modified instance of the structure

Inherited from:
Structure
Returns:

the entities that are inside the structure

Inherited from:
Structure

Method that allows an entity to exit from the structure. This method WILL NOT handle the entity position, but it will only remove the entity from internal structures.

Method that allows an entity to exit from the structure. This method WILL NOT handle the entity position, but it will only remove the entity from internal structures.

Value parameters:
entity

the entity that need to exit

Returns:

The modified instance of the structure without the entity inside

Inherited from:
Structure

Each structure has associated a strategy that affects the enter of entities.

Each structure has associated a strategy that affects the enter of entities.

Returns:

the strategy

Inherited from:
Structure
protected def exit(entity: BaseEntity): BaseStructure

Method that remove an entity from the structure.

Method that remove an entity from the structure.

Value parameters:
entity

the entity that want to exit

Returns:

the modified instance of the structure without the entity inside.

Inherited from:
Structure

Each structure has an infection probability that influence the infection of an entity that is inside.

Each structure has an infection probability that influence the infection of an entity that is inside.

Returns:

the infection probability when an entity is inside the structure

Inherited from:
Structure
protected def notEntered(entity: BaseEntity, timeStamp: SimulationTime): BaseStructure

Method to handle the situation in which an entity can't enter in the structure.

Method to handle the situation in which an entity can't enter in the structure.

Value parameters:
entity

the entity for witch the entering is denied

timeStamp

the timestamp in which the entity request to enter

Returns:

the resulting structure instance

Inherited from:
Structure

Each structure has a permanence time defined by a time distribution.

Each structure has a permanence time defined by a time distribution.

Returns:

the time distribution that describe the permanence time

Inherited from:
Structure

Being placeable, the structure has a position.

Being placeable, the structure has a position.

Returns:

the position of the structure

Inherited from:
Structure

Method that allows an entity to try to enter inside the structure. Note that an entity could not be allowed to enter based on the characteristics of the structure.

Method that allows an entity to try to enter inside the structure. Note that an entity could not be allowed to enter based on the characteristics of the structure.

Value parameters:
entity

the entity that wants to enter

Returns:

The modified instance of the structure if entered

Inherited from:
Structure