Skip to content

Commit

Permalink
Add missing parameter in constructor
Browse files Browse the repository at this point in the history
Signed-off-by: Sophie Frasnedo <[email protected]>
  • Loading branch information
So-Fras committed Sep 29, 2023
1 parent 8cfa185 commit 75ec5fb
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,16 @@ public DirectionalFeederInfo(String componentType, double value, DoubleFunction<
this.value = value;
}

public DirectionalFeederInfo(String componentType, double value, String unit, BiFunction<Double, String, String> formatter) {
super(componentType, null, formatter.apply(value, unit), null);
public DirectionalFeederInfo(String componentType, double value, String unit, BiFunction<Double, String, String> formatter, String userDefinedId) {
super(componentType, null, formatter.apply(value, unit), userDefinedId);
this.arrowDirection = Objects.requireNonNull(getArrowDirection(value));
this.value = value;
}

public DirectionalFeederInfo(String componentType, double value, String unit, BiFunction<Double, String, String> formatter) {
this(componentType, value, unit, formatter, null);
}

private static LabelProvider.LabelDirection getArrowDirection(double value) {
return value > 0 ? LabelProvider.LabelDirection.OUT : LabelProvider.LabelDirection.IN;
}
Expand Down

0 comments on commit 75ec5fb

Please sign in to comment.