Karamata’s Theorem for Integrals