com.applitools.eyes.universal.mapper.NMGOptionsMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eyes-sdk-core-java5 Show documentation
Show all versions of eyes-sdk-core-java5 Show documentation
Applitools Eyes SDK base for Java
package com.applitools.eyes.universal.mapper;
import com.applitools.eyes.visualgrid.model.NMGOptions;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
public class NMGOptionsMapper {
public static Map toNMGOptionsMapperDtoList(List nmgOptions) {
if (nmgOptions == null || nmgOptions.isEmpty()) {
return null;
}
Map ufgOptionsMap = nmgOptions.stream()
.filter(nmgOption -> nmgOption.getKey().equals("nonNMGCheck") && nmgOption.getKey() != null
&& nmgOption.getValue().equals("addToAllDevices") && nmgOption.getValue() != null)
.collect(Collectors.toMap(NMGOptions::getKey, NMGOptions::getValue));
return ufgOptionsMap.size() == 0? null : ufgOptionsMap;
}
}