Skip to content

Commit

Permalink
SeriesBuilder missing generics parameter appreciated#185
Browse files Browse the repository at this point in the history
  • Loading branch information
Bethibande committed Jul 12, 2024
1 parent 1758aca commit b3fd2a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public class SeriesBuilder<T> {
private SeriesBuilder() {
}

public static SeriesBuilder<?> get() {
return new SeriesBuilder();
public static <T> SeriesBuilder<T> get() {
return new SeriesBuilder<>();
}

public SeriesBuilder<T> withName(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public LineChartExample() {
.withCategories("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep")
.withTickPlacement(TickPlacement.BETWEEN)
.build())
.withSeries(new Series<>("Desktops", 10.0, 41.0, 35.0, 51.0, 49.0, 62.0, 69.0, 91.0, 148.0));
.withSeries(SeriesBuilder.get()
.withName("Desktops")
.withData(10.0, 41.0, 35.0, 51.0, 49.0, 62.0, 69.0, 91.0, 148.0)
.build());
}
}

0 comments on commit b3fd2a7

Please sign in to comment.