Java Record Generic Type