isTransmittedBy method

bool isTransmittedBy(
  1. String speciesId
)

Checks if this disease is transmitted by a specific mosquito species.

Returns true if the given species ID is listed as a vector for this disease.

Example:

if (dengue.isTransmittedBy('aedes_aegypti')) {
  print('Aedes aegypti can transmit dengue');
}

Implementation

bool isTransmittedBy(String speciesId) {
  return vectors.contains(speciesId);
}