StickerPacksValidator.java 1.93 KB
package com.bitstrips.imoji.util;

import com.bitstrips.imoji.models.Sticker;
import com.bitstrips.imoji.models.StickerPack;
import com.bitstrips.imoji.models.StickerPacks;
import java.util.Iterator;
import java.util.List;

public class StickerPacksValidator
{
  public static boolean validate(StickerPacks paramStickerPacks)
  {
    if (paramStickerPacks == null) {
      return false;
    }
    if (paramStickerPacks.get() == null) {
      return false;
    }
    try
    {
      Object localObject2;
      do
      {
        paramStickerPacks = paramStickerPacks.get().iterator();
        Object localObject1;
        while (!((Iterator)localObject1).hasNext())
        {
          if (!paramStickerPacks.hasNext()) {
            break;
          }
          localObject1 = (StickerPack)paramStickerPacks.next();
          if (((StickerPack)localObject1).getTitle() == null) {
            return false;
          }
          if (((StickerPack)localObject1).getStickers() == null) {
            return false;
          }
          localObject1 = ((StickerPack)localObject1).getStickers().iterator();
        }
        localObject2 = (Sticker)((Iterator)localObject1).next();
        if (((Sticker)localObject2).getComicId() == null) {
          return false;
        }
        if (((Sticker)localObject2).getTemplateId() == null) {
          return false;
        }
        if (((Sticker)localObject2).getImageUrl() == null) {
          return false;
        }
        if (((Sticker)localObject2).getTags() == null) {
          return false;
        }
        localObject2 = ((Sticker)localObject2).getCapabilities();
      } while (localObject2 != null);
      return false;
    }
    catch (Exception paramStickerPacks)
    {
      return false;
    }
    return true;
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/util/StickerPacksValidator.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */