code: private static boolean inRange(Text text, Collection<Range> ranges)
      {
          Key kCq = new Key(text);
          return ranges.stream().anyMatch(r -> !r.beforeStartKey(kCq) && !r.afterEndKey(kCq));
      }
docs: Gets a Boolean value indicating if the given value is in one of the Ranges in the given collection
  
  @param text Text object to check against the Range collection
  @param ranges Ranges to look into
  @return True if the text object is in one of the ranges, false otherwise