ni.java 1.89 KB
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.google.common.math.IntMath;
import java.util.AbstractList;
import java.util.List;
import java.util.ListIterator;
import java.util.RandomAccess;
import javax.annotation.Nullable;

@GwtCompatible
public final class ni<E>
  extends AbstractList<List<E>>
  implements RandomAccess
{
  private final transient ImmutableList<List<E>> a;
  private final transient int[] b;
  
  public ni(ImmutableList<List<E>> paramImmutableList)
  {
    this.a = paramImmutableList;
    int[] arrayOfInt = new int[paramImmutableList.size() + 1];
    arrayOfInt[paramImmutableList.size()] = 1;
    try
    {
      int i = paramImmutableList.size() - 1;
      while (i >= 0)
      {
        arrayOfInt[i] = IntMath.checkedMultiply(arrayOfInt[(i + 1)], ((List)paramImmutableList.get(i)).size());
        i -= 1;
      }
      this.b = arrayOfInt;
    }
    catch (ArithmeticException paramImmutableList)
    {
      throw new IllegalArgumentException("Cartesian product too large; must have size at most Integer.MAX_VALUE");
    }
  }
  
  public final boolean contains(@Nullable Object paramObject)
  {
    if (!(paramObject instanceof List)) {
      return false;
    }
    paramObject = (List)paramObject;
    if (((List)paramObject).size() != this.a.size()) {
      return false;
    }
    paramObject = ((List)paramObject).listIterator();
    while (((ListIterator)paramObject).hasNext())
    {
      int i = ((ListIterator)paramObject).nextIndex();
      if (!((List)this.a.get(i)).contains(((ListIterator)paramObject).next())) {
        return false;
      }
    }
    return true;
  }
  
  public final int size()
  {
    return this.b[0];
  }
}


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