Class ActivityHelper

java.lang.Object
com.flexganttfx.model.util.ActivityHelper

public class ActivityHelper
extends Object
A helper class for working with activities.
  • Constructor Details

    • ActivityHelper

      public ActivityHelper()
  • Method Details

    • intersect

      public static boolean intersect​(Activity activity1, Activity activity2)
      Checks whether the time bounds of the two given activities intersect with each other.
      Parameters:
      activity1 - the first activity
      activity2 - 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 interval
      endTime1 - end time of the first time interval
      startTime2 - start time of the second time interval
      endTime2 - 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 interval
      endTime1 - end time of the first time interval
      startTime2 - start time of the second time interval
      endTime2 - 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 interval
      endTime1 - end time of the first time interval
      startTime2 - start time of the second time interval
      endTime2 - end time of the second time interval
      Returns:
      true if the time intervals intersect with each other