All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.mmm.util.value.api.NumberRange Maven / Gradle / Ivy

There is a newer version: 8.7.0
Show newest version
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0
 * http://www.apache.org/licenses/LICENSE-2.0 */
package net.sf.mmm.util.value.api;

import java.util.Comparator;

import net.sf.mmm.util.lang.base.NumberComparator;

/**
 * This class extends {@link Range} to allow mixed types of {@link Number} to be used.
 *
 * @author hohwille
 * @since 7.1.0
 */
public class NumberRange extends Range {

  /** TODO: javadoc. */
  private static final long serialVersionUID = 1L;

  /**
   * The constructor.
   */
  public NumberRange() {
    super();
  }

  /**
   * The constructor.
   *
   * @param min - see {@link #getMin()}. To create an open range use the minimum value.
   * @param max - see {@link #getMax()}. To create an open range use the maximum value.
   */
  public NumberRange(Number min, Number max) {
    super(min, max);
  }

  @Override
  protected Comparator getComparator() {

    return NumberComparator.getInstance();
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy