From 3386609f45a26001227edf725ecba9bcbd24f175 Mon Sep 17 00:00:00 2001 From: Jonathan Cobb Date: Thu, 27 Aug 2020 07:35:22 -0400 Subject: [PATCH] use static imports --- .../src/main/java/bubble/model/app/AppDataFormat.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bubble-server/src/main/java/bubble/model/app/AppDataFormat.java b/bubble-server/src/main/java/bubble/model/app/AppDataFormat.java index 2e3a78ad..22af478c 100644 --- a/bubble-server/src/main/java/bubble/model/app/AppDataFormat.java +++ b/bubble-server/src/main/java/bubble/model/app/AppDataFormat.java @@ -8,21 +8,22 @@ import com.fasterxml.jackson.annotation.JsonCreator; import lombok.AllArgsConstructor; import java.util.function.Function; -import java.util.stream.Collectors; import java.util.stream.Stream; import static bubble.ApiConstants.enumFromString; +import static java.util.stream.Collectors.toList; +import static java.util.stream.Collectors.toMap; @AllArgsConstructor public enum AppDataFormat { - key (s -> s.map(AppData::getKey).collect(Collectors.toList())), + key (s -> s.map(AppData::getKey).collect(toList())), - value (s -> s.map(AppData::getData).collect(Collectors.toList())), + value (s -> s.map(AppData::getData).collect(toList())), - key_value (s -> s.collect(Collectors.toMap(AppData::getKey, AppData::getData))), + key_value (s -> s.collect(toMap(AppData::getKey, AppData::getData))), - full (s -> s.collect(Collectors.toList())); + full (s -> s.collect(toList())); @JsonCreator public static AppDataFormat fromString (String v) { return enumFromString(AppDataFormat.class, v); }