com.applitools.eyes.universal.mapper.LayoutBreakpointsMapper 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.options.LayoutBreakpointsOptions;
import com.applitools.eyes.universal.dto.LayoutBreakpointsDto;
public class LayoutBreakpointsMapper {
public static LayoutBreakpointsDto toLayoutBreakpointsDto(LayoutBreakpointsOptions layoutBreakpointsOptions) {
if (layoutBreakpointsOptions == null) {
return null;
}
Object breakpoints = layoutBreakpointsOptions.isLayoutBreakpoints() != null ? layoutBreakpointsOptions.isLayoutBreakpoints() :
layoutBreakpointsOptions.getLayoutBreakpoints().isEmpty() ? null : layoutBreakpointsOptions.getLayoutBreakpoints();
if (breakpoints == null) {
return null;
}
LayoutBreakpointsDto dto = new LayoutBreakpointsDto();
dto.setBreakpoints(breakpoints);
dto.setReload(layoutBreakpointsOptions.getReload());
return dto;
}
}