shaie commented on PR #841:
URL: https://github.com/apache/lucene/pull/841#issuecomment-1157282173

   I'll try to paste excerpts of the code here:
   
   ```
     public static LongRange fromLongs(
         long min, boolean minInclusive, long max, boolean maxInclusive) {
         // here comes the current constructor code of LongRange
     }
   
     public static LongRange fromDoubles(
         double min, boolean minInclusive, double max, boolean maxInclusive) {
         // Here comes the code that we used to have in DoubleRangePair
     }
   
     // The new sole constructor of LongRange
     public LongRange(long min, long max) {
       this.min = min
       this.max = max;
     }
   ```
   
   To use it in tests it looks like this:
   
   ```
               new RangeFacetSetMatcher(
                   "Ford [2010-2014]",
                   singleDouble(FORD_ORD), // This calls 
RangeFacetSetMatcher.fromDoubles(...)
                   doubleRange(2010.0, true, 2014.0, true)), // This calls 
RangeFacetSetMatcher.fromDoubles(...)
               new RangeFacetSetMatcher(
                   "Ford (2010-2014]",
                   singleDouble(FORD_ORD),
                   doubleRange(2010.0, false, 2014.0, true)),
   ```
   
   WDYT?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to