I am trying to make Map<BooleanSupplier, List<String>> part of my stream. I make providers and then try to use an immutable map builder.
Sort of:
//Build up BooleanSuppliers Map<BooleanSupplier, List<String>> bsList = ImmutableMap.builder() .put(bs1, Collections.singletonList("bs1string")) .put(bs2, Arrays.asList("bs4","bs6")) .... .build();
The problem is that intellij says that types are not converted, even if I do an explicit cast, because ImmutableMap is of type <Object, Object> . Is there a way to explicitly specify or initialize an immutable map ImmutableMap<BooleanSupplier, List<String>> like ImmutableMap<BooleanSupplier, List<String>> ?
source share