Java Number Range Create range(int value, int min, int max)

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

Description

range

License

Open Source License

Declaration

public static int range(int value, int min, int max) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int range(int value, int min, int max) {
        if (value < min)
            return min;
        if (value > max)
            return max;
        return value;
    }/*from w  ww. j av  a  2 s.co m*/
}

Related

  1. range(int start, int length, int step)
  2. range(int start, int stop)
  3. range(int startValue, int endValue)
  4. range(int unit)
  5. range(int v, int min, int max)
  6. range(Integer from, Integer to)
  7. range(long array[])
  8. range(long start, long end)
  9. range(String field, int start, int end)