match method
- ProtectionType type,
- double rating,
- String curve,
- double sens,
override
Implementation
@override
ProtectionDefinition? match(
ProtectionType type, double rating, String curve, double sens) {
try {
return getProtections().firstWhere((p) =>
p.type == type &&
p.ratingAmps == rating &&
(type == ProtectionType.circuitBreaker
? p.curve == curve
: p.sensitivityMa == sens));
} catch (_) {
return null;
}
}