lookup method

Set<SamplingPackage> lookup(
  1. String type
)

Lookup the SamplingPackages that support the type of data.

Typically, only one package supports a specific type. Howerver, if more than one package does, all packages are returned. Can be an empty list.

Implementation

Set<SamplingPackage> lookup(String type) {
  final Set<SamplingPackage> supportedPackages = {};

  for (var package in packages) {
    if (package.dataTypes.contains(type)) supportedPackages.add(package);
  }

  return supportedPackages;
}