com.dft.api.shopify.model.ShopifyVariantRequestPositionComparator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shopify-admin-rest Show documentation
Show all versions of shopify-admin-rest Show documentation
Shopify Admin REST API using JDK 11 and Reactive Programming
The newest version!
package com.dft.api.shopify.model;
import java.util.Comparator;
public class ShopifyVariantRequestPositionComparator implements Comparator
{
@Override
public int compare(final ShopifyVariantRequest shopifyVariantRequest,
final ShopifyVariantRequest otherShopifyVariantRequest) {
final int position1 = shopifyVariantRequest.getRequest().getPosition();
final int position2 = otherShopifyVariantRequest.getRequest().getPosition();
return position1 - position2;
}
}