-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Labels
Description
Describe the current behavior
LimitViolation uses several new functions that call each other to create a LimitViolation object, with the top most having 11 arguments.
Describe the expected behavior
Use a builder instead with default values.
Describe the motivation
Being able to change the value of any argument without having to put default values for all the other arguments.
For example, here is one of the constructor:
public LimitViolation(String subjectId, LimitViolationType limitType, String limitName, int acceptableDuration,
double limit, double limitReduction, double value)Now if I want to specify a ViolationLocation, I need to call:
public LimitViolation(String subjectId, @Nullable String subjectName, LimitViolationType limitType, @Nullable String limitName, int acceptableDuration,
double limit, double limitReduction, double value, @Nullable ThreeSides side, @Nullable ViolationLocation voltageLocation)Which means I can't just specify the ViolationLocation, I also need to specify subjectName, and side even though I might not have any interest in those values.
Extra Information
No response
Reactions are currently unavailable