Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifications to support Java 8 as the minimum requirement #70

Merged
merged 1 commit into from
Nov 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
Expand Down Expand Up @@ -106,7 +108,9 @@ public class JFreeChartBuilderDemo {
private static final LocalDateTime endDate = LocalDateTime.now();
private static final LocalDateTime startDate = endDate.minus(18, ChronoUnit.MONTHS);

private static final Set<DayOfWeek> ohlcvSkipDays = Set.of(DayOfWeek.SATURDAY, DayOfWeek.SUNDAY);
// Java 8 min requirement can't use Set.of()
public static DayOfWeek[] OHLCV_SKIP_DAYS = {DayOfWeek.SATURDAY, DayOfWeek.SUNDAY};
private static final Set<DayOfWeek> ohlcvSkipDays = new HashSet<>(Arrays.asList(OHLCV_SKIP_DAYS));

private static IDateTimeSeriesProvider timeProvider = AscendingDateTimeGenerator.get();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,10 @@ public interface IXYTimeSeriesPlotBuilder<T extends IXYTimeSeriesPlotBuilder<T>>
*
* @deprecated This facility is replaced by {@link IXYTimeSeriesPlotBuilder#majorGrid(boolean)} and
* {@link IXYTimeSeriesPlotBuilder#minorGrid(boolean)}, and will be removed in a future release.
* <p>
* <b>For removal since v1.5.7</b>
*/
@Deprecated(since = "1.5.7", forRemoval = true)
@Deprecated
T gridLines();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,10 @@ public OhlcPlotBuilder axisColor(Paint color) {
*
* @deprecated This facility is replaced by {@link OhlcPlotBuilder#majorGrid(boolean)} and
* {@link OhlcPlotBuilder#minorGrid(boolean)}, and will be removed in a future release.
* <p>
* <b>For removal since v1.5.7</b>
*/
@Deprecated(since = "1.5.7", forRemoval = true)
@Deprecated
@Override
public OhlcPlotBuilder gridLines() {
elements.majorGrid(true); // Legacy behavior
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ public XYTimeSeriesPlotBuilder axisColor(Paint color) {
*
* @deprecated This facility is replaced by {@link XYTimeSeriesPlotBuilder#majorGrid(boolean)} and
* {@link XYTimeSeriesPlotBuilder#minorGrid(boolean)}, and will be removed in a future release.
* <p>
* <b>For removal since v1.5.7</b>
*/
@Deprecated(since = "1.5.7", forRemoval = true)
@Deprecated
@Override
public XYTimeSeriesPlotBuilder gridLines() {
elements.majorGrid(true); // Legacy behavior
Expand Down