public < U > Leadership < U > map ( Function < T , U > mapper ) { return new Leadership <> ( leader != null ? leader . map ( mapper ) : null , candidates . stream ( ) . map ( mapper ) . collect ( Collectors . toList ( ) ) ) ; }
Maps the leadership identifiers using the given mapper .