Java Number Range Check inRange(int value, int min, int max)

Here you can find the source of inRange(int value, int min, int max)

Description

checks if a value is in the range min..max, min+max are included

License

Open Source License

Parameter

Parameter Description
value a parameter
min a parameter
max a parameter

Declaration

public static boolean inRange(int value, int min, int max) 

Method Source Code

//package com.java2s;

public class Main {
    public static boolean inRange(double value, double min, double max) {
        return (value >= min && value <= max);
    }//  w  w  w.  j av  a2s.  c  om

    /**
     * checks if a value is in the range min..max, min+max are included
     *
     * @param value
     * @param min
     * @param max
     * @return
     */
    public static boolean inRange(int value, int min, int max) {
        return (value >= min && value <= max);
    }
}

Related

  1. inRange(int l, int u, int v, int... v_)
  2. inRange(int minValue, int maxValue, int value)
  3. inRange(int n, int lo, int hi)
  4. inRange(int num, int from, int to, int flag)
  5. inRange(int value, int lowerBound, int upperBound)
  6. inRange(int value, int min, int max)
  7. inRange(int value, int min, int max)
  8. inRange(int value, int min, int max)
  9. inRange(int x, int a, int b)