MarkDacek edited a comment on issue #398: Add ComparableUtils
URL: https://github.com/apache/commons-lang/pull/398#issuecomment-460823621
 
 
   Sorry, was on vacation for a bit. The compareTo method is defined by each 
class. Not everything will check for nulls, though I would assume most JRE 
classes would. 
   
   I might think that this idea is better accomplished using static methods and 
building in null-checks. `new ComparableCheckBuilder(a).greaterThan(b)` doesn't 
seem worthwhile when `a.compareTo(b) > 0` is a less-expensive operation. 
   
   Something like `ComparableUtils.greaterThan(a,b)` might be better, though 
I'm still unsure of its usefulness. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to