java.lang.Object
com.flexganttfx.model.util.ActivityHelper
public class ActivityHelper extends Object
A helper class for working with activities.
-
Constructor Summary
Constructors Constructor Description ActivityHelper()
-
Method Summary
Modifier and Type Method Description static boolean
intersect(long startTime1, long endTime1, long startTime2, long endTime2)
Checks whether the two given time bounds intersect with each other.static boolean
intersect(Activity activity1, Activity activity2)
Checks whether the time bounds of the two given activities intersect with each other.static boolean
intersect(Instant startTime1, Instant endTime1, Instant startTime2, Instant endTime2)
Checks whether the two given time bounds intersect with each other.static boolean
intersect(LocalTime startTime1, LocalTime endTime1, LocalTime startTime2, LocalTime endTime2)
Checks whether the two given time bounds intersect with each other.
-
Constructor Details
-
ActivityHelper
public ActivityHelper()
-
-
Method Details
-
intersect
Checks whether the time bounds of the two given activities intersect with each other.- Parameters:
activity1
- the first activityactivity2
- the second activity- Returns:
- true if the time bounds intersect
-
intersect
public static boolean intersect(Instant startTime1, Instant endTime1, Instant startTime2, Instant endTime2)Checks whether the two given time bounds intersect with each other.- Parameters:
startTime1
- start time of the first time intervalendTime1
- end time of the first time intervalstartTime2
- start time of the second time intervalendTime2
- end time of the second time interval- Returns:
- true if the time intervals intersect with each other
-
intersect
public static boolean intersect(long startTime1, long endTime1, long startTime2, long endTime2)Checks whether the two given time bounds intersect with each other.- Parameters:
startTime1
- start time of the first time intervalendTime1
- end time of the first time intervalstartTime2
- start time of the second time intervalendTime2
- end time of the second time interval- Returns:
- true if the time intervals intersect with each other
-
intersect
public static boolean intersect(LocalTime startTime1, LocalTime endTime1, LocalTime startTime2, LocalTime endTime2)Checks whether the two given time bounds intersect with each other.- Parameters:
startTime1
- start time of the first time intervalendTime1
- end time of the first time intervalstartTime2
- start time of the second time intervalendTime2
- end time of the second time interval- Returns:
- true if the time intervals intersect with each other
-