java.lang.Object
org.apache.jena.sparql.service.enhancer.impl.util.RangeUtils

public class RangeUtils extends Object
Utility methods for working with guava Range instances
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <C extends Comparable<C>>
    com.google.common.collect.RangeSet<C>
    gaps(com.google.common.collect.Range<C> requestRange, com.google.common.collect.RangeSet<C> availableRanges)
     
    static <I extends Comparable<I>, O extends Comparable<O>>
    com.google.common.collect.Range<O>
    map(com.google.common.collect.Range<I> range, Function<? super I,? extends O> mapper)
    Perform a map operation on all present endpoints
    static com.google.common.collect.Range<Long>
    shiftLong(com.google.common.collect.Range<Long> rawRange, long distance)
    Shift the endpoints of the range of type 'Long' by the given distance
    static com.google.common.collect.Range<Long>
    toRange(Long offset, Long limit)
     
    static com.google.common.collect.Range<Long>
    toRange(org.apache.jena.query.Query query)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RangeUtils

      public RangeUtils()
  • Method Details

    • gaps

      public static <C extends Comparable<C>> com.google.common.collect.RangeSet<C> gaps(com.google.common.collect.Range<C> requestRange, com.google.common.collect.RangeSet<C> availableRanges)
    • toRange

      public static com.google.common.collect.Range<Long> toRange(org.apache.jena.query.Query query)
    • toRange

      public static com.google.common.collect.Range<Long> toRange(Long offset, Long limit)
    • shiftLong

      public static com.google.common.collect.Range<Long> shiftLong(com.google.common.collect.Range<Long> rawRange, long distance)
      Shift the endpoints of the range of type 'Long' by the given distance
    • map

      public static <I extends Comparable<I>, O extends Comparable<O>> com.google.common.collect.Range<O> map(com.google.common.collect.Range<I> range, Function<? super I,? extends O> mapper)
      Perform a map operation on all present endpoints