Closed foal closed 7 years ago
My reading of that thread lends me to believe that we're got a producer. And the pattern should be List<? extends Rule>.
Is there a specific compile time problem you're trying to solve?
Easy :)
private static final List<CharacterRule> RULES = ImmutableList.of(ucimpRule);
//...
validator = new PasswordValidator(StreamEx.of(RULES).map(r -> (Rule) r).toList());
And looks like you are right. It is a producer. So List<? extends Rule>.
From
to
see for more information http://stackoverflow.com/questions/2723397/what-is-pecs-producer-extends-consumer-super