package org.joda.time;

import java.io.Serializable;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

/* loaded from: classes.dex */
public class PeriodType implements Serializable {
    private static final long serialVersionUID = 2274324892792009998L;

    /* renamed from: y, reason: collision with root package name */
    private static PeriodType f31893y;

    /* renamed from: z, reason: collision with root package name */
    private static PeriodType f31894z;
    private final int[] iIndices;
    private final String iName;
    private final DurationFieldType[] iTypes;

    /* renamed from: p, reason: collision with root package name */
    private static final Map f31884p = new HashMap(32);

    /* renamed from: q, reason: collision with root package name */
    static int f31885q = 0;

    /* renamed from: r, reason: collision with root package name */
    static int f31886r = 1;

    /* renamed from: s, reason: collision with root package name */
    static int f31887s = 2;

    /* renamed from: t, reason: collision with root package name */
    static int f31888t = 3;

    /* renamed from: u, reason: collision with root package name */
    static int f31889u = 4;

    /* renamed from: v, reason: collision with root package name */
    static int f31890v = 5;

    /* renamed from: w, reason: collision with root package name */
    static int f31891w = 6;

    /* renamed from: x, reason: collision with root package name */
    static int f31892x = 7;

    protected PeriodType(String str, DurationFieldType[] durationFieldTypeArr, int[] iArr) {
        this.iName = str;
        this.iTypes = durationFieldTypeArr;
        this.iIndices = iArr;
    }

    public static PeriodType a() {
        PeriodType periodType = f31893y;
        if (periodType != null) {
            return periodType;
        }
        PeriodType periodType2 = new PeriodType("Days", new DurationFieldType[]{DurationFieldType.b()}, new int[]{-1, -1, -1, 0, -1, -1, -1, -1});
        f31893y = periodType2;
        return periodType2;
    }

    public static PeriodType c() {
        PeriodType periodType = f31894z;
        if (periodType != null) {
            return periodType;
        }
        PeriodType periodType2 = new PeriodType("Seconds", new DurationFieldType[]{DurationFieldType.k()}, new int[]{-1, -1, -1, -1, -1, -1, 0, -1});
        f31894z = periodType2;
        return periodType2;
    }

    public String b() {
        return this.iName;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof PeriodType) {
            return Arrays.equals(this.iTypes, ((PeriodType) obj).iTypes);
        }
        return false;
    }

    public int hashCode() {
        int i10 = 0;
        int i11 = 0;
        while (true) {
            DurationFieldType[] durationFieldTypeArr = this.iTypes;
            if (i10 >= durationFieldTypeArr.length) {
                return i11;
            }
            i11 += durationFieldTypeArr[i10].hashCode();
            i10++;
        }
    }

    public String toString() {
        return "PeriodType[" + b() + "]";
    }
}
