Map> adjList = Stream.of( new SimpleEntry<>("Edmonton", Arrays.asList("E N1", "E N2", "E N3")), new SimpleEntry<>("Vancouver", Arrays.asList("V N1", "V N2", "V N3"))) .collect(Collectors.toMap((e) -> e.getKey(), (e) -> e.getValue()));