소스 검색

use static imports

tags/v1.0.0
Jonathan Cobb 4 년 전
부모
커밋
3386609f45
1개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. +6
    -5
      bubble-server/src/main/java/bubble/model/app/AppDataFormat.java

+ 6
- 5
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); }



불러오는 중...
취소
저장