package com.amplifyframework.core.model.query.predicate;

import com.amplifyframework.core.model.query.predicate.QueryOperator;
import java.lang.Comparable;
import s3.d;

/* loaded from: classes4.dex */
public final class BetweenQueryOperator<T extends Comparable<T>> extends QueryOperator<T> {
    private final T end;
    private final T start;

    /* JADX INFO: Access modifiers changed from: package-private */
    public BetweenQueryOperator(T t10, T t11) {
        super(QueryOperator.Type.BETWEEN);
        this.start = t10;
        this.end = t11;
    }

    public T end() {
        return this.end;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || BetweenQueryOperator.class != obj.getClass()) {
            return false;
        }
        BetweenQueryOperator betweenQueryOperator = (BetweenQueryOperator) obj;
        return d.a(type(), betweenQueryOperator.type()) && d.a(start(), betweenQueryOperator.start()) && d.a(end(), betweenQueryOperator.end());
    }

    public int hashCode() {
        return d.b(type(), start(), end());
    }

    public T start() {
        return this.start;
    }

    public String toString() {
        return "BetweenQueryOperator { type: " + type() + ", start: " + this.start + ", end: " + this.end + " }";
    }

    @Override // com.amplifyframework.core.model.query.predicate.Evaluable
    public boolean evaluate(T t10) {
        return t10.compareTo(this.start) >= 0 && t10.compareTo(this.end) <= 0;
    }
}
