UnaryLongFunction and UnaryDoubleFunction are specific sub-types that return long and double (respectively).  Note that UnaryFunction itself doesn't impose type restrictions.  I'll improve the comments around this.