package com.amplifyframework.util;

import java.lang.Comparable;

/* loaded from: classes4.dex */
public final class Range<T extends Comparable<T>> {
    private final T high;
    private final T low;

    public Range(T t10, T t11) throws IllegalArgumentException {
        if (t10.compareTo(t11) > 0) {
            throw new IllegalArgumentException("Low value should be lower than high");
        }
        this.low = t10;
        this.high = t11;
    }

    public boolean contains(T t10) {
        return t10.compareTo(this.low) >= 0 && t10.compareTo(this.high) <= 0;
    }
}
