java.util.function.Consumer
does not extend java.util.function.Function
. But what if you want a set of both types? Why isn’t there a ConsumerFunction?
A ConsumerFunction is not defined in java.util.function
. You can easily do it yourself. But you will see that it’s not that simple. void
is a keyword in Java. There is a class Void
and (by reflection) you can even get an instance of Void
. But you have to use a return statement to get a Function
.
Category: Programming
Blogs about Programming suck!
They do! And so do most online tutorials. Buy a good book instead!
Continue reading “Blogs about Programming suck!”
How to replace Object.finalize()
There are many articles and blog posts about this topic but rarely are they complete. I’ll cover finalizers, Finalizer Guardian idiom, Dispose Pattern, PhantomReference and Cleanable.