Generic stateless paginator component for Java