class IntEqQuery implements EqQuery<Number> {

    @Override
    public Query termQuery(String field, Number value, boolean hasDocValues, boolean isIndexed) {
        if (isIndexed) {
            return IntPoint.newExactQuery(field, value.intValue());
        }
        if (hasDocValues) {
            return SortedNumericDocValuesField.newSlowExactQuery(field, value.intValue());
        }
        return null;
    }

    @Override
    public Query rangeQuery(String field,
                            Number lowerTerm,
                            Number upperTerm,
                            boolean includeLower,
                            boolean includeUpper,
                            boolean hasDocValues,
                            boolean isIndexed) {<FILL_FUNCTION_BODY>}

    @Override
    public Query termsQuery(String field, List<Number> nonNullValues, boolean hasDocValues, boolean isIndexed) {
        if (isIndexed) {
            return IntPoint.newSetQuery(field, nonNullValues.stream().mapToInt(Number::intValue).toArray());
        }
        if (hasDocValues) {
            return SortedNumericDocValuesField.newSlowSetQuery(field, nonNullValues.stream().mapToLong(Number::longValue).toArray());
        }
        return null;
    }
}

        int lower = Integer.MIN_VALUE;
        if (lowerTerm != null) {
            lower = includeLower ? lowerTerm.intValue() : lowerTerm.intValue() + 1;
        }
        int upper = Integer.MAX_VALUE;
        if (upperTerm != null) {
            upper = includeUpper ? upperTerm.intValue() : upperTerm.intValue() - 1;
        }
        if (isIndexed) {
            return IntPoint.newRangeQuery(field, lower, upper);
        }
        if (hasDocValues) {
            return SortedNumericDocValuesField.newSlowRangeQuery(field, lower, upper);
        }
        return null;
    
<no_super_class>