filterByTeam static method

Map<int, List<HollisticMatchScoutingData>> filterByTeam(
  1. List<HollisticMatchScoutingData> allMatches
)

Implementation

static Map<int, List<HollisticMatchScoutingData>> filterByTeam(
    List<HollisticMatchScoutingData> allMatches) {
  Map<int, List<HollisticMatchScoutingData>> temp =
      <int, List<HollisticMatchScoutingData>>{};
  for (HollisticMatchScoutingData r in allMatches) {
    if (temp.containsKey(r.preliminary.teamNumber)) {
      temp[r.preliminary.teamNumber]!.add(r);
    } else {
      temp[r.preliminary.teamNumber] = <HollisticMatchScoutingData>[
        r
      ];
    }
  }
  return temp;
}