Class IntervalUtils
- java.lang.Object
-
- org.processmining.servicelevelagreements.model.interval.IntervalUtils
-
public class IntervalUtils extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIntervalUtils.IntervalEndTimestampComparatorComparator that sorts Intervals based on their end timestamps.static classIntervalUtils.IntervalStartAndEndTimestampComparatorComparator that sorts Intervals based on their start timestamps, and then on their end timestamps (IntervalUtils.IntervalEndTimestampComparator).static classIntervalUtils.IntervalStartTimestampComparatorComparator that sorts Intervals based on their start timestamps.
-
Constructor Summary
Constructors Constructor Description IntervalUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static IntervalListintersect(IntervalList head, java.util.List<IntervalList> tail)Computes the list of maximal intervals I such that I is the intersection between the head and every element of the tail.protected static IntervalListintersect(IntervalList L1, IntervalList L2)Computes the list of maximal intervals I such that I is the intersection between the two lists of intervals L1 and L2.protected static Intervalintersect(Interval i, Interval j)Computes the interval x representing the intersection between two intervals i and j.static IntervalListintersect_all(java.util.List<IntervalList> L)Computes the list of maximal intervals I such that I is the intersection of the lists of intervals of list L.protected static IntervalListminus(IntervalList I, IntervalList J)Computes the list of maximal intervals M such that M = I / J.static IntervalListrelative_complement_all(IntervalList Iprime, java.util.List<IntervalList> L)Computes the list of maximal intervals I such that I is the relative complement of the list of maximal intervals J with respect to the maximal intervals of list L.protected static IntervalListremove_empty_intervals(IntervalList L)Computes the list I produced by removing empty intervals from the list L.static IntervaltextToInterval(java.lang.String text)static IntervalListtextToIntervalList(java.lang.String text)static java.util.List<IntervalList>textToListOfIntervalList(java.lang.String text)static IntervalListunion_all(java.util.List<IntervalList> L)Computes the list I of maximal intervals produced by the union of the lists of maximal intervals of list L.
-
-
-
Method Detail
-
remove_empty_intervals
protected static IntervalList remove_empty_intervals(IntervalList L)
Computes the list I produced by removing empty intervals from the list L.- Parameters:
L-- Returns:
- I
-
union_all
public static IntervalList union_all(java.util.List<IntervalList> L)
Computes the list I of maximal intervals produced by the union of the lists of maximal intervals of list L. L is allowed to be empty, contain empty lists and contain empty intervals in any of the lists.- Parameters:
L-- Returns:
- I
-
intersect_all
public static IntervalList intersect_all(java.util.List<IntervalList> L)
Computes the list of maximal intervals I such that I is the intersection of the lists of intervals of list L. L is allowed to be empty, contain empty lists, or contain empty intervals in any of the lists.- Parameters:
L-- Returns:
- I
-
intersect
protected static IntervalList intersect(IntervalList head, java.util.List<IntervalList> tail)
Computes the list of maximal intervals I such that I is the intersection between the head and every element of the tail. Head and tail are allowed to be empty or contain empty intervals.- Parameters:
head-tail-- Returns:
- I
-
intersect
protected static IntervalList intersect(IntervalList L1, IntervalList L2)
Computes the list of maximal intervals I such that I is the intersection between the two lists of intervals L1 and L2. L1 and L2 are allowed to be empty or contain empty intervals.- Parameters:
L1-L2-- Returns:
- I
-
intersect
protected static Interval intersect(Interval i, Interval j)
Computes the interval x representing the intersection between two intervals i and j. The intervals i and j are allowed to be empty or open-ended, but need to be closed-open intervals.- Parameters:
i-j-- Returns:
- x
-
relative_complement_all
public static IntervalList relative_complement_all(IntervalList Iprime, java.util.List<IntervalList> L)
Computes the list of maximal intervals I such that I is the relative complement of the list of maximal intervals J with respect to the maximal intervals of list L.- Parameters:
Iprime-L-- Returns:
- I
-
minus
protected static IntervalList minus(IntervalList I, IntervalList J)
Computes the list of maximal intervals M such that M = I / J. J is assumed not to have any overlapping intervals (since the origin is usually the union of aList<<IntervalList>.- Parameters:
I-J-- Returns:
- M
-
textToInterval
public static Interval textToInterval(java.lang.String text)
-
textToIntervalList
public static IntervalList textToIntervalList(java.lang.String text)
-
textToListOfIntervalList
public static java.util.List<IntervalList> textToListOfIntervalList(java.lang.String text)
-
-