what-the-bank/sources/com/google/android/gms/maps/model/Cap.java

97 lines
3.5 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.maps.model;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.Objects;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.google.android.gms.dynamic.IObjectWrapper;
/* loaded from: classes2.dex */
public class Cap extends AbstractSafeParcelable {
public static final Parcelable.Creator<Cap> CREATOR = new zzb();
private static final String TAG = "Cap";
private final BitmapDescriptor bitmapDescriptor;
private final int type;
private final Float zzcn;
private Cap(int i, BitmapDescriptor bitmapDescriptor, Float f) {
boolean z = false;
boolean z2 = f != null && f.floatValue() > BitmapDescriptorFactory.HUE_RED;
if (i != 3 || (bitmapDescriptor != null && z2)) {
z = true;
}
Preconditions.checkArgument(z, String.format("Invalid Cap: type=%s bitmapDescriptor=%s bitmapRefWidth=%s", Integer.valueOf(i), bitmapDescriptor, f));
this.type = i;
this.bitmapDescriptor = bitmapDescriptor;
this.zzcn = f;
}
/* JADX INFO: Access modifiers changed from: package-private */
public Cap(int i, IBinder iBinder, Float f) {
this(i, iBinder == null ? null : new BitmapDescriptor(IObjectWrapper.Stub.asInterface(iBinder)), f);
}
/* JADX INFO: Access modifiers changed from: protected */
public Cap(BitmapDescriptor bitmapDescriptor, float f) {
this(3, bitmapDescriptor, Float.valueOf(f));
}
/* JADX INFO: Access modifiers changed from: protected */
public Cap(int i) {
this(i, (BitmapDescriptor) null, (Float) null);
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeInt(parcel, 2, this.type);
BitmapDescriptor bitmapDescriptor = this.bitmapDescriptor;
SafeParcelWriter.writeIBinder(parcel, 3, bitmapDescriptor == null ? null : bitmapDescriptor.zzb().asBinder(), false);
SafeParcelWriter.writeFloatObject(parcel, 4, this.zzcn, false);
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
}
public int hashCode() {
int i = this.type;
return Objects.hashCode(Integer.valueOf(i), this.bitmapDescriptor, this.zzcn);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Cap)) {
return false;
}
Cap cap = (Cap) obj;
return this.type == cap.type && Objects.equal(this.bitmapDescriptor, cap.bitmapDescriptor) && Objects.equal(this.zzcn, cap.zzcn);
}
public String toString() {
int i = this.type;
StringBuilder sb = new StringBuilder(23);
sb.append("[Cap: type=");
sb.append(i);
sb.append("]");
return sb.toString();
}
/* JADX INFO: Access modifiers changed from: package-private */
public final Cap zzh() {
int i = this.type;
if (i == 0) {
return new ButtCap();
}
if (i == 1) {
return new SquareCap();
}
if (i != 2) {
return i != 3 ? this : new CustomCap(this.bitmapDescriptor, this.zzcn.floatValue());
}
return new RoundCap();
}
}