예제 #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());
 }
예제 #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);
 }
예제 #3
0
 public void put(KeyType key, Set<MemberType> value) {
   setMapAdapter.put(
       mapName,
       keyToStringFun.apply(key),
       value.stream().map(memberToStringFun).collect(Collectors.toSet()));
 }
예제 #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());
 }
예제 #5
0
 public Set<KeyType> keySet() {
   Set<String> keyStr = setMapAdapter.keySet(mapName);
   return keyStr.stream().map(stringToKeyFun).collect(Collectors.toSet());
 }