Class ToQuantityFunction