Closed techsy730 closed 3 years ago
I'm a bit concerned by these semantic mixups. More than anything because each of these concepts has a different method naming. That's why IntUnaryOperator is not a Int2In2Function. I think we should keep the conceptual separation of the JDK unless there's some cogent reason.
Fair enough. How about I remove BooleanPredicate extending BooleanUnaryOperator, but keep the new identity and negation methods?
Ok done. BooleanPredicate
no longer extends BooleanUnaryOperator
Thanks, I forgot the identity method.
At this point was could as well add numeric negation to all other types except for char...
Ok, added a negation
for numeric types.
Adds the static method
identity
to UnaryOperator For numeric primitives, addsnegation
, performing arithmetic negation. ForBooleanUnaryOperator
, addsnegation
, performing logical negation.For
BooleanPredicate
, it also adds those methods, as it also takes a boolean and returns a boolean, thus they make sense there too.