com.dft.api.shopify.model.ShopifyAssets 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
package com.dft.api.shopify.model;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ShopifyAssets {
private final Map themeIdToShopifyAsset;
public ShopifyAssets(final List shopifyAssets) {
themeIdToShopifyAsset = new HashMap<>(shopifyAssets.size());
shopifyAssets.stream().forEach(shopifyAsset -> {
themeIdToShopifyAsset.put(shopifyAsset.getKey(), shopifyAsset);
});
}
public ShopifyAsset get(final String themeId) {
return themeIdToShopifyAsset.get(themeId);
}
public List values() {
return new ArrayList<>(themeIdToShopifyAsset.values());
}
public int size() {
return themeIdToShopifyAsset.size();
}
public boolean containsKey(final String themeId) {
return themeIdToShopifyAsset.containsKey(themeId);
}
}