eclipse-collections icon indicating copy to clipboard operation
eclipse-collections copied to clipboard

Change return types of some factory methods in Predicates(i.e. alwaysTrue) as generics instead of Object

Open henohenotsuyoshi opened this issue 5 years ago • 2 comments

Hi team, I wonder it would be better to change return type of Predicates#alwaysTrue as generics instead of Object. Following code does not compile right now. Predicate<Employee> alwaysTrue = Predicates.alwaysTrue(); As far as I checked, I think we should refactor isNull, attributeIsNull, notNull, attributeNotNull, sameAs, notSameAs, instanceOf, assignableFrom, notInstanceOf, alwaysTrue, alwaysFalse methods in Predicates class.

henohenotsuyoshi avatar Jul 26 '20 19:07 henohenotsuyoshi

Does this compile? Predicates.<Employee>alwaysTrue()

nikhilnanivadekar avatar Jul 26 '20 19:07 nikhilnanivadekar

No, it does not compile.

henohenotsuyoshi avatar Jul 28 '20 16:07 henohenotsuyoshi