Skip to content

Commit

Permalink
Move With enum into MovingCondition
Browse files Browse the repository at this point in the history
  • Loading branch information
derTobsch committed Dec 23, 2024
1 parent 7415d24 commit dbb43ad
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.time.LocalDate;
import java.util.function.Function;

import static de.focus_shift.jollyday.core.spi.With.NEXT;
import static de.focus_shift.jollyday.core.spi.Movable.MovingCondition.With.NEXT;
import static java.time.temporal.TemporalAdjusters.nextOrSame;
import static java.time.temporal.TemporalAdjusters.previousOrSame;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ public interface Movable {
*/
interface MovingCondition {

enum With {
NEXT,
PREVIOUS
}

/**
* Represents the day of the week as trigger to move the holiday if the holiday would
* occur oh this weekday.
Expand All @@ -50,6 +55,5 @@ interface MovingCondition {
* @return the weekday the holiday will be moved to
*/
DayOfWeek substitute();

}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package de.focus_shift.jollyday.core.parser.functions;

import de.focus_shift.jollyday.core.spi.Movable;
import de.focus_shift.jollyday.core.spi.With;
import org.junit.jupiter.api.Test;

import java.time.DayOfWeek;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import de.focus_shift.jollyday.core.spi.Holidays;
import de.focus_shift.jollyday.core.spi.IslamicHoliday;
import de.focus_shift.jollyday.core.spi.Movable;
import de.focus_shift.jollyday.core.spi.With;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package de.focus_shift.jollyday.core.parser.predicates;

import de.focus_shift.jollyday.core.spi.Movable;
import de.focus_shift.jollyday.core.spi.With;
import org.junit.jupiter.api.Test;

import java.time.DayOfWeek;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package de.focus_shift.jollyday.jackson;

import de.focus_shift.jollyday.core.spi.Movable;
import de.focus_shift.jollyday.core.spi.With;

import java.time.DayOfWeek;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package de.focus_shift.jollyday.jaxb;

import de.focus_shift.jollyday.core.spi.Movable;
import de.focus_shift.jollyday.core.spi.With;

import java.time.DayOfWeek;

Expand Down

0 comments on commit dbb43ad

Please sign in to comment.