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

47 lines
1.8 KiB
Java

package com.google.android.gms.maps.model;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.Objects;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
/* loaded from: classes2.dex */
public class StreetViewPanoramaLink extends AbstractSafeParcelable {
public static final Parcelable.Creator<StreetViewPanoramaLink> CREATOR = new zzn();
public final float bearing;
public final String panoId;
public StreetViewPanoramaLink(String str, float f) {
this.panoId = str;
this.bearing = (((double) f) <= 0.0d ? (f % 360.0f) + 360.0f : f) % 360.0f;
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeString(parcel, 2, this.panoId, false);
SafeParcelWriter.writeFloat(parcel, 3, this.bearing);
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
}
public int hashCode() {
return Objects.hashCode(this.panoId, Float.valueOf(this.bearing));
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof StreetViewPanoramaLink)) {
return false;
}
StreetViewPanoramaLink streetViewPanoramaLink = (StreetViewPanoramaLink) obj;
return this.panoId.equals(streetViewPanoramaLink.panoId) && Float.floatToIntBits(this.bearing) == Float.floatToIntBits(streetViewPanoramaLink.bearing);
}
public String toString() {
return Objects.toStringHelper(this).add("panoId", this.panoId).add("bearing", Float.valueOf(this.bearing)).toString();
}
}