Beispiel #1
0
 public List<Set<MemberType>> values() {
   List<Set<String>> valueStr = setMapAdapter.values(mapName);
   return valueStr
       .stream()
       .map(
           s -> {
             return s.stream().map(stringToMemberFun).collect(Collectors.toSet());
           })
       .collect(Collectors.toList());
 }
Beispiel #2
0
 void buildInMem() {
   Collection<EntityType> data = dataSrcFun.apply(dataSrc);
   java.util.Map<String, Set<String>> setMap =
       data.stream()
           .collect(
               Collectors.groupingBy(
                   e -> keyToStringFun.apply(keyGetFun.apply(e)),
                   Collectors.mapping(
                       e -> memberToStringFun.apply(memberGetFun.apply(e)), Collectors.toSet())));
   setMapAdapter.putInMem(mapName, setMap);
 }
Beispiel #3
0
 public void put(KeyType key, Set<MemberType> value) {
   setMapAdapter.put(
       mapName,
       keyToStringFun.apply(key),
       value.stream().map(memberToStringFun).collect(Collectors.toSet()));
 }
Beispiel #4
0
 public Set<MemberType> get(KeyType key) {
   Set<String> keyStrSet = setMapAdapter.get(mapName, keyToStringFun.apply(key));
   return keyStrSet.stream().map(stringToMemberFun).collect(Collectors.toSet());
 }
Beispiel #5
0
 public Set<KeyType> keySet() {
   Set<String> keyStr = setMapAdapter.keySet(mapName);
   return keyStr.stream().map(stringToKeyFun).collect(Collectors.toSet());
 }