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. However, 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.samplingSchemes.contains(type)) {
      supportedPackages.add(package);
    }
  }

  return supportedPackages;
}