Class OffsetMap<V>

    • Constructor Detail

      • OffsetMap

        public OffsetMap()
      • OffsetMap

        public OffsetMap​(SortedMap<org.apache.commons.lang3.Range<Integer>,​? extends V> other)
      • OffsetMap

        public OffsetMap​(Iterable<? extends Span> items)
    • Method Detail

      • restrictTo

        public NavigableMap<org.apache.commons.lang3.Range<Integer>,​V> restrictTo​(org.apache.commons.lang3.Range<Integer> range)
        Limits a map to entries within a range.
        Parameters:
        range - The range containing the limits
        Returns:
        A map of all entries whose keys lie between the minimum of range, inclusive, and the maximum of range, also inclusive.
      • restrictTo

        public NavigableMap<org.apache.commons.lang3.Range<Integer>,​V> restrictTo​(Span range)
        Limits a map to entries within a range.
        Parameters:
        range - The range containing the limits
        Returns:
        A map of all entries whose keys lie between the minimum of range, inclusive, and the maximum of range, also inclusive.
      • getOverlapping

        public NavigableMap<org.apache.commons.lang3.Range<Integer>,​V> getOverlapping​(org.apache.commons.lang3.Range<Integer> range)
      • emptyOffsetMap

        public static <V> OffsetMap<V> emptyOffsetMap()
      • put

        public V put​(Span span)
      • getFirstLargestIntersectionValue

        public V getFirstLargestIntersectionValue​(org.apache.commons.lang3.Range<Integer> range)

        Returns the first value in the map that intersects the given range and does not have a smaller intersection than following elements.

        Parameters:
        range - The range to check for intersections.
        Returns:
        The first value with the largest intersection with the given range or null if there is no intersecting element.
      • getFirstLargestOverlappingValue

        public V getFirstLargestOverlappingValue​(org.apache.commons.lang3.Range<Integer> range)