All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.applitools.eyes.universal.mapper.NMGOptionsMapper Maven / Gradle / Ivy

There is a newer version: 5.76.0
Show newest version
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;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy