From 5c6b38890185d3dd6e7054471c338c1290fdc844 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Thu, 16 Mar 2023 23:09:26 +0400 Subject: [PATCH] #91 -- Reformat --- .../extractor/markup/service/MarkupService.java | 12 ++++++------ src/main/resources/templates/markup.html | 8 +++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java b/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java index 2d3096f..c222d39 100644 --- a/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java +++ b/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java @@ -38,22 +38,22 @@ public class MarkupService { List tsForMarkup = new ArrayList<>(); for (int i = 0; i < timeSeriesList.size(); i++) { TimeSeries ts1 = timeSeriesList.get(i); - for (int j = i + 1; j < timeSeriesList.size(); j++) { + for (int j = i+1; j < timeSeriesList.size(); j++) { TimeSeries ts2 = timeSeriesList.get(j); List values1 = ts1.getValues(); - for (int k = 0; k < values1.size() - 1; k++) { + for (int k = 0; k < values1.size()-1; k++) { List values2 = ts2.getValues(); - for (int l = 0; l < values2.size() - 1; l++) { + for (int l = 0; l < values2.size()-1; l++) { if (values1.get(k).getDate().equals(values2.get(l).getDate()) - && values1.get(k + 1).getDate().equals(values2.get(l + 1).getDate())) { + && values1.get(k+1).getDate().equals(values2.get(l+1).getDate())) { final int index = k; TimeSeriesForMarkup found = tsForMarkup .stream() - .filter(m -> m.getDateFrom().equals(values1.get(index).getDate()) && m.getDateTo().equals(values1.get(index + 1).getDate())) + .filter(m -> m.getDateFrom().equals(values1.get(index).getDate()) && m.getDateTo().equals(values1.get(index+1).getDate())) .findAny() .orElse(null); if (found == null) { - tsForMarkup.add(new TimeSeriesForMarkup(ts1, ts2, values1.get(index).getDate(), values1.get(index + 1).getDate())); + tsForMarkup.add(new TimeSeriesForMarkup(ts1, ts2, values1.get(index).getDate(), values1.get(index+1).getDate())); } else { found.getTimeSeriesSet().add(ts1); found.getTimeSeriesSet().add(ts2); diff --git a/src/main/resources/templates/markup.html b/src/main/resources/templates/markup.html index 0f085fe..87746b9 100644 --- a/src/main/resources/templates/markup.html +++ b/src/main/resources/templates/markup.html @@ -22,9 +22,7 @@ @@ -41,10 +39,10 @@ - + - +