package com.google.android.m4b.maps.bu;

import com.google.android.m4b.maps.model.LatLng;
import com.google.android.m4b.maps.model.PolygonOptions;
import com.google.android.m4b.maps.model.internal.IPolygonDelegate;
import com.google.android.m4b.maps.model.internal.IPolygonDelegate.Stub;
import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

public final class bi extends IPolygonDelegate.Stub
  implements bf.a, bh
{
  private static AtomicInteger a = new AtomicInteger(0);
  private static final PolygonOptions b = new PolygonOptions();
  private final String c;
  private final bf d;
  private final cb e;
  private bh.a f;
  private by g;
  private List<LatLng> h;
  private List<LatLng> i;
  private List<List<LatLng>> j;
  private final List<List<LatLng>> k = Lists.newArrayList();
  private int l;
  private int m;
  private float n;
  private float o;
  private boolean p;
  private boolean q;
  private boolean r;

  bi(PolygonOptions paramPolygonOptions, bf parambf, cb paramcb, by paramby)
  {
    this.d = ((bf)Preconditions.checkNotNull(parambf));
    this.e = ((cb)Preconditions.checkNotNull(paramcb));
    this.g = paramby;
    Object[] arrayOfObject = new Object[1];
    arrayOfObject[0] = Integer.valueOf(a.getAndIncrement());
    this.c = String.format("pg%d", arrayOfObject);
    if (paramPolygonOptions.getStrokeWidth() >= 0.0F);
    for (boolean bool = true; ; bool = false)
    {
      Preconditions.checkArgument(bool, "line width is negative");
      this.n = paramPolygonOptions.getStrokeWidth();
      this.l = paramPolygonOptions.getStrokeColor();
      this.m = paramPolygonOptions.getFillColor();
      this.o = paramPolygonOptions.getZIndex();
      this.q = paramPolygonOptions.isVisible();
      this.p = paramPolygonOptions.isGeodesic();
      this.h = Lists.newArrayList(paramPolygonOptions.getPoints());
      a(this.h);
      this.j = Lists.newArrayList();
      Iterator localIterator = paramPolygonOptions.getHoles().iterator();
      while (localIterator.hasNext())
      {
        ArrayList localArrayList = Lists.newArrayList((List)localIterator.next());
        a(localArrayList);
        this.j.add(localArrayList);
      }
    }
    i();
    if (paramPolygonOptions.getStrokeColor() != b.getStrokeColor())
      this.e.b(cb.a.K);
    if (paramPolygonOptions.getStrokeWidth() != b.getStrokeWidth())
      this.e.b(cb.a.J);
    if (paramPolygonOptions.isGeodesic() != b.isGeodesic())
      this.e.b(cb.a.O);
    if (paramPolygonOptions.isVisible() != b.isVisible())
      this.e.b(cb.a.N);
    if (paramPolygonOptions.getZIndex() != b.getZIndex())
      this.e.b(cb.a.M);
    if (paramPolygonOptions.getHoles() != b.getHoles())
      this.e.b(cb.a.I);
  }

  private void a(int paramInt)
  {
    try
    {
      if (this.r)
        return;
      this.f.a(paramInt);
      return;
    }
    finally
    {
    }
  }

  private static void a(List<LatLng> paramList)
  {
    if (!((LatLng)paramList.get(0)).equals(paramList.get(-1 + paramList.size())))
      paramList.add(paramList.get(0));
  }

  private void i()
  {
    if (this.p);
    for (List localList1 = q.a(this.h); ; localList1 = this.h)
    {
      this.i = localList1;
      this.k.clear();
      Iterator localIterator = this.j.iterator();
      while (localIterator.hasNext())
      {
        List localList2 = (List)localIterator.next();
        List localList3 = this.k;
        if (this.p)
          localList2 = q.a(localList2);
        localList3.add(localList2);
      }
    }
  }

  private boolean j()
  {
    try
    {
      boolean bool = this.p;
      return bool;
    }
    finally
    {
      localObject = finally;
      throw localObject;
    }
  }

  public final void a()
  {
    try
    {
      if (this.r)
        return;
      this.r = true;
      this.f.a();
      return;
    }
    finally
    {
    }
  }

  final void a(bh.a parama)
  {
    this.f = parama;
  }

  public final List<LatLng> b()
  {
    try
    {
      List localList = this.i;
      return localList;
    }
    finally
    {
      localObject = finally;
      throw localObject;
    }
  }

  public final List<List<LatLng>> c()
  {
    try
    {
      List localList = this.k;
      return localList;
    }
    finally
    {
      localObject = finally;
      throw localObject;
    }
  }

  public final int d()
  {
    try
    {
      int i1 = this.l;
      return i1;
    }
    finally
    {
      localObject = finally;
      throw localObject;
    }
  }

  public final int e()
  {
    try
    {
      int i1 = this.m;
      return i1;
    }
    finally
    {
      localObject = finally;
      throw localObject;
    }
  }

  public final boolean equalsRemote(IPolygonDelegate paramIPolygonDelegate)
  {
    return equals(paramIPolygonDelegate);
  }

  public final float f()
  {
    try
    {
      float f1 = this.n;
      return f1;
    }
    finally
    {
      localObject = finally;
      throw localObject;
    }
  }

  public final float g()
  {
    try
    {
      float f1 = this.o;
      return f1;
    }
    finally
    {
      localObject = finally;
      throw localObject;
    }
  }

  public final int getFillColor()
  {
    this.g.a();
    return e();
  }

  public final List getHoles()
  {
    this.g.a();
    ArrayList localArrayList = Lists.newArrayList();
    try
    {
      Iterator localIterator = this.j.iterator();
      while (localIterator.hasNext())
        localArrayList.add(Lists.newArrayList((List)localIterator.next()));
    }
    finally
    {
    }
    return localArrayList;
  }

  public final String getId()
  {
    return this.c;
  }

  public final List<LatLng> getPoints()
  {
    this.g.a();
    try
    {
      ArrayList localArrayList = Lists.newArrayList(this.h);
      return localArrayList;
    }
    finally
    {
      localObject = finally;
      throw localObject;
    }
  }

  public final int getStrokeColor()
  {
    this.g.a();
    return d();
  }

  public final float getStrokeWidth()
  {
    this.g.a();
    return f();
  }

  public final float getZIndex()
  {
    this.g.a();
    return g();
  }

  public final boolean h()
  {
    try
    {
      boolean bool = this.q;
      return bool;
    }
    finally
    {
      localObject = finally;
      throw localObject;
    }
  }

  public final int hashCodeRemote()
  {
    return hashCode();
  }

  public final boolean isGeodesic()
  {
    this.g.a();
    return j();
  }

  public final boolean isVisible()
  {
    this.g.a();
    return h();
  }

  public final void remove()
  {
    this.g.a();
    this.e.b(cb.a.G);
    a();
    this.d.b(this);
  }

  public final void setFillColor(int paramInt)
  {
    this.g.a();
    this.e.b(cb.a.L);
    try
    {
      this.m = paramInt;
      a(16);
      return;
    }
    finally
    {
    }
  }

  public final void setGeodesic(boolean paramBoolean)
  {
    this.g.a();
    this.e.b(cb.a.O);
    try
    {
      this.p = paramBoolean;
      i();
      a(3);
      return;
    }
    finally
    {
    }
  }

  public final void setHoles(List paramList)
  {
    this.g.a();
    this.e.b(cb.a.I);
    try
    {
      this.j.clear();
      Iterator localIterator = paramList.iterator();
      while (localIterator.hasNext())
      {
        ArrayList localArrayList = Lists.newArrayList((List)localIterator.next());
        a(localArrayList);
        this.j.add(localArrayList);
      }
    }
    finally
    {
    }
    i();
    a(2);
  }

  public final void setPoints(List<LatLng> paramList)
  {
    this.g.a();
    this.e.b(cb.a.H);
    try
    {
      this.h = Lists.newArrayList(paramList);
      a(this.h);
      i();
      a(1);
      return;
    }
    finally
    {
    }
  }

  public final void setStrokeColor(int paramInt)
  {
    this.g.a();
    this.e.b(cb.a.K);
    try
    {
      this.l = paramInt;
      a(8);
      return;
    }
    finally
    {
    }
  }

  public final void setStrokeWidth(float paramFloat)
  {
    this.g.a();
    this.e.b(cb.a.J);
    boolean bool;
    if (paramFloat >= 0.0F)
      bool = true;
    while (true)
    {
      Preconditions.checkArgument(bool, "line width is negative");
      try
      {
        this.n = paramFloat;
        return;
        bool = false;
      }
      finally
      {
      }
    }
  }

  public final void setVisible(boolean paramBoolean)
  {
    this.g.a();
    this.e.b(cb.a.N);
    try
    {
      this.q = paramBoolean;
      a(32);
      return;
    }
    finally
    {
    }
  }

  public final void setZIndex(float paramFloat)
  {
    this.g.a();
    this.e.b(cb.a.M);
    try
    {
      this.o = paramFloat;
      a(64);
      return;
    }
    finally
    {
    }
  }
}

/* Location:           C:\Documents and Settings\Cesar Cabello Cea\Mis documentos\Downloads\apk-downloader\com.ikea.kompis-6_dex2jar.jar
 * Qualified Name:     com.google.android.m4b.maps.bu.bi
 * JD-Core Version:    0.6.2
 */