Class PriorityOverlapResolver
java.lang.Object
overit.geocallapp.utilities.timeline.overlapresolver.PriorityOverlapResolver
- All Implemented Interfaces:
Serializable,OverlapResolver
Implementation of
When multiple
Higher priority values take precedence over lower priority values in the resolution process.
OverlapResolver that resolves overlaps based on TimeLineItem priority values.When multiple
TimeLineRange objects overlap, this resolver selects the range with the highest priority TimeLineItem.Higher priority values take precedence over lower priority values in the resolution process.
- Since:
- 1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolveOverlaps(List<TimeLineRange> ranges) Resolves overlapping timeline ranges by selecting the range with the highest priority item.
-
Constructor Details
-
PriorityOverlapResolver
public PriorityOverlapResolver()
-
-
Method Details
-
resolveOverlaps
Resolves overlapping timeline ranges by selecting the range with the highest priority item. Iterates through all ranges and returns the one whoseTimeLineItemhas the maximum priority value.- Specified by:
resolveOverlapsin interfaceOverlapResolver- Parameters:
ranges- the list of overlappingTimeLineRangeobjects to resolve- Returns:
- the
TimeLineRangewith the highest priorityTimeLineItem - Throws:
IllegalArgumentException- if ranges is null or empty
-