- return pinMapping.stream().filter(p -> p.getType() == filteredType)
- .collect(Collectors.toMap(VerilogEmulatedModelPin::getPinbit, Function.identity()));
+ Map<PinNameBit, VerilogEmulatedModelPin> result = new HashMap<>();
+ for (VerilogEmulatedModelPin p : pinMapping)
+ if (p.getType() == filteredType)
+ for (PinNameBit pinbit : p.getPinbits())
+ result.put(pinbit, p);
+ return Map.copyOf(result);