package org.joda.time.field;

import java.io.Serializable;
import java.util.HashMap;
import org.joda.time.DurationFieldType;

/* loaded from: classes5.dex */
public final class UnsupportedDurationField extends org.joda.time.d implements Serializable {

    /* renamed from: p, reason: collision with root package name */
    private static HashMap f32032p = null;
    private static final long serialVersionUID = -6390301302770925357L;
    private final DurationFieldType iType;

    private UnsupportedDurationField(DurationFieldType durationFieldType) {
        this.iType = durationFieldType;
    }

    private Object readResolve() {
        return w(this.iType);
    }

    public static synchronized UnsupportedDurationField w(DurationFieldType durationFieldType) {
        UnsupportedDurationField unsupportedDurationField;
        synchronized (UnsupportedDurationField.class) {
            HashMap hashMap = f32032p;
            if (hashMap == null) {
                f32032p = new HashMap(7);
                unsupportedDurationField = null;
            } else {
                unsupportedDurationField = (UnsupportedDurationField) hashMap.get(durationFieldType);
            }
            if (unsupportedDurationField == null) {
                unsupportedDurationField = new UnsupportedDurationField(durationFieldType);
                f32032p.put(durationFieldType, unsupportedDurationField);
            }
        }
        return unsupportedDurationField;
    }

    private UnsupportedOperationException y() {
        return new UnsupportedOperationException(this.iType + " field is unsupported");
    }

    @Override // org.joda.time.d
    public long a(long j10, int i10) {
        throw y();
    }

    @Override // org.joda.time.d
    public long e(long j10, long j11) {
        throw y();
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof UnsupportedDurationField)) {
            return false;
        }
        UnsupportedDurationField unsupportedDurationField = (UnsupportedDurationField) obj;
        return unsupportedDurationField.x() == null ? x() == null : unsupportedDurationField.x().equals(x());
    }

    @Override // org.joda.time.d
    public int g(long j10, long j11) {
        throw y();
    }

    public int hashCode() {
        return x().hashCode();
    }

    @Override // org.joda.time.d
    public long m(long j10, long j11) {
        throw y();
    }

    @Override // org.joda.time.d
    public final DurationFieldType r() {
        return this.iType;
    }

    @Override // org.joda.time.d
    public long s() {
        return 0L;
    }

    @Override // org.joda.time.d
    public boolean t() {
        return true;
    }

    public String toString() {
        return "UnsupportedDurationField[" + x() + ']';
    }

    @Override // org.joda.time.d
    public boolean u() {
        return false;
    }

    @Override // java.lang.Comparable
    /* renamed from: v, reason: merged with bridge method [inline-methods] */
    public int compareTo(org.joda.time.d dVar) {
        return 0;
    }

    public String x() {
        return this.iType.e();
    }
}
