Source code
Description: source: package: org.apache.commons.lang3, class: NumberRange

    001/*
    002 * Licensed to the Apache Software Foundation (ASF) under one or more
    003 * contributor license agreements.  See the NOTICE file distributed with
    004 * this work for additional information regarding copyright ownership.
    005 * The ASF licenses this file to You under the Apache License, Version 2.0
    006 * (the "License"); you may not use this file except in compliance with
    007 * the License.  You may obtain a copy of the License at
    008 *
    009 *      https://www.apache.org/licenses/LICENSE-2.0
    010 *
    011 * Unless required by applicable law or agreed to in writing, software
    012 * distributed under the License is distributed on an "AS IS" BASIS,
    013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    014 * See the License for the specific language governing permissions and
    015 * limitations under the License.
    016 */
    017
    018package org.apache.commons.lang3;
    019
    020import java.util.Comparator;
    021
    022/**
    023 * Specializes {@link Range} for {@link Number}s.
    024 * <p>
    025 * We only offer specializations for Integer, Long, and Double (like Java Streams).
    026 * </p>
    027 *
    028 * @param <N> The Number class.
    029 * @since 3.13.0
    030 */
    031public class NumberRange<N extends Number> extends Range<N> {
    032
    033    private static final long serialVersionUID = 1L;
    034
    035    /**
    036     * Creates an instance.
    037     *
    038     * @param number1 the first element, not null
    039     * @param number2 the second element, not null
    040     * @param comp the comparator to be used, null for natural ordering
    041     * @throws NullPointerException when element1 is null.
    042     * @throws NullPointerException when element2 is null.
    043     */
    044    public NumberRange(final N number1, final N number2, final Comparator<N> comp) {
    045        super(number1, number2, comp);
    046    }
    047
    048}