[ http://issues.apache.org/jira/browse/COLLECTIONS-8?page=comments#action_12445781 ] Stepan Koltsov commented on COLLECTIONS-8: ------------------------------------------
I think, that such predicate should have only three criterions: 1, 0, -1, for greater, equals and less. GE and LE can be constructed as not(less), not(greater). PredicateUtils should have methods: Predicate greaterPredicate(Object) { ... } Predicate lessPredicate(Object) { ... } Predicate greaterOrEqualsPredicate(Object) { return notPredicate(lessPredicate(object)); } Predicate lessOrEqualsPredicate(Object) { return notPredicate(greaterPredicate(object)); } equality through comparator is not often needed, so need not to be exposed to PredicateUtils. > Comparator Predicate > -------------------- > > Key: COLLECTIONS-8 > URL: http://issues.apache.org/jira/browse/COLLECTIONS-8 > Project: Commons Collections > Issue Type: New Feature > Components: Functor > Affects Versions: 3.1 > Environment: Operating System: other > Platform: Other > Reporter: Rune Peter Bjørnstad > Priority: Minor > Fix For: 3.3 > > Attachments: ComparatorPredicate.diff, ComparatorPredicate.java > > > A predicate that makes use of a Comparator object for evaluation is, in my > opinion, missing in the functors package. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]