fork download
  1. import java.util.ArrayList;
  2. import java.util.HashMap;
  3. import java.util.List;
  4. import java.util.Map;
  5. import java.util.stream.Collectors;
  6.  
  7. class Test {
  8. public static void main(String[] args) {
  9. List<String> strings = new ArrayList<>();
  10. List<Item> items = strings.stream().map(tqsScore -> new Item(new HashMap())).collect(Collectors.toList());
  11. }
  12. }
  13.  
  14. class Item {
  15. public Map<String, String> metadata;
  16.  
  17. Item(Map<String, String> metadata) {
  18. this.metadata = metadata;
  19. }
  20. }
Success #stdin #stdout 0.08s 33992KB
stdin
Standard input is empty
stdout
Standard output is empty