Class SplittableTimeLineRange

java.lang.Object
overit.geocallapp.wfm.orchestrator.planning.timeline.SplittableTimeLineRange
All Implemented Interfaces:
Serializable

public class SplittableTimeLineRange extends Object implements Serializable
Splittable TimeLineItem object
Since:
19.0
See Also:
  • Constructor Details

    • SplittableTimeLineRange

      public SplittableTimeLineRange()
  • Method Details

    • buildSplittableTimeLineRange

      public static SplittableTimeLineRange buildSplittableTimeLineRange(TimeLineItem<?> item, SplitCriteria criteria)
    • split

      public List<SplittableTimeLineRange> split(boolean includeExtremities)
    • getBegin

      public Date getBegin()
      Returns the start date of the range
      Returns:
      the start date of the range
    • getEnd

      public Date getEnd()
      Returns the end date of the range
      Returns:
      the end date of the range
    • getItem

      public TimeLineItem<?> getItem()
      Returns the item of the time range
      Returns:
    • isOverlapping

      public boolean isOverlapping(SplittableTimeLineRange range)
      Return true if the input range overlaps the current range, false otherwise.
    • getOverlappingRanges

      public List<SplittableTimeLineRange> getOverlappingRanges(List<SplittableTimeLineRange> ranges)
      Returns the sublist of ranges that overlaps the current range.
    • contains

      public boolean contains(Date date, boolean excludeEndDate)
      Return true if the input date is contained in the current range, false otherwise.
      Parameters:
      date - the input date
      excludeEndDate - says if the end date is an inclusion point or not
      Returns:
    • isAdjacent

      public boolean isAdjacent(SplittableTimeLineRange range)
      Returns true if the input range is adjacent to the current range, false otherwise;
    • getDuration

      public int getDuration(int unit)
      Returns the range duration.
    • toString

      public String toString()
      Overrides:
      toString in class Object