Re: AW: [commons-lang3] NumberUtils feature

2018-01-01 Thread Lucas Carvalho
Hello Javen, Thanks for you reply, when i sended the code, i have writend quickly, however, if this feature i`ll be aproved, i will follow java / API convension. Ps. When I think in "between function", the first thing that comes in the head is SQL BETWEEN ... Obrigado. Atenciosamente Lucas Car

Re: AW: [commons-lang3] NumberUtils feature

2018-01-01 Thread Lucas Carvalho
Hi Gilles, When was thinking about this implementation, i was thinking in primitive types and Object (Integer, Double), but for Object, i think "Range" is ok to use. Thanks, Lucas On Sun, Dec 31, 2017 at 8:30 AM, Gilles wrote: > On Sat, 30 Dec 2017 14:25:32 +0100, Jan Matèrne wrote: > >>

Re: AW: [commons-lang3] NumberUtils feature

2018-01-01 Thread Javen O'Neal
I'm -1 for a static function as suggested by Lucas. It doesn't improve code readability, and I'd argue that it decreases readability because of needing to memorize operator order, ambiguous inclusivity of endpoints (unless you add isStrictlyBetween), and doesn't gracefully handle mixed data types,

Re: AW: [commons-lang3] NumberUtils feature

2017-12-31 Thread Gilles
On Sat, 30 Dec 2017 14:25:32 +0100, Jan Matèrne wrote: Maybe open the comparators and use a fluent API? is(42).between(10).and(50) == true is(10).between(10).and(20) == false is(10).between(10).and(20).includingLeft() == true is(50).between(10).and(50) == false is(50).between(10).and(50).includin

AW: [commons-lang3] NumberUtils feature

2017-12-30 Thread jhm
Maybe open the comparators and use a fluent API? is(42).between(10).and(50) == true is(10).between(10).and(20) == false is(10).between(10).and(20).includingLeft() == true is(50).between(10).and(50) == false is(50).between(10).and(50).includingRight() == true Just quick thoughts ... Jan > -