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

com.dft.api.shopify.model.ShopifyVariantRequestOption1Comparator Maven / Gradle / Ivy

There is a newer version: 2024.10.01
Show newest version
package com.dft.api.shopify.model;

import java.util.Comparator;

import org.apache.commons.lang3.ObjectUtils;

public class ShopifyVariantRequestOption1Comparator implements Comparator {
	@Override
	public int compare(final ShopifyVariantRequest shopifyVariantRequest,
			final ShopifyVariantRequest otherShopifyVariantRequest) {
		final String option1 = shopifyVariantRequest.getRequest().getOption1();
		final String otherOption1 = otherShopifyVariantRequest.getRequest().getOption1();
		return (option1 == null || otherOption1 == null) ? ObjectUtils.compare(option1, otherOption1)
				: option1.compareToIgnoreCase(otherOption1);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy