com.shopify.model.ShopifyVariantRequestOption1Comparator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shopify-sdk Show documentation
Show all versions of shopify-sdk Show documentation
Java SDK for Shopify REST API.
package com.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 - 2025 Weber Informatics LLC | Privacy Policy