Java Range rangeLimit(int receiver, int minBound, int maxBound)

Here you can find the source of rangeLimit(int receiver, int minBound, int maxBound)

Description

range Limit

License

Open Source License

Declaration

public static int rangeLimit(int receiver, int minBound, int maxBound) 

Method Source Code

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

public class Main {
    public static int rangeLimit(int receiver, int minBound, int maxBound) {
        if (receiver < minBound)
            return minBound;
        else if (receiver > maxBound)
            return maxBound;
        else/*  w  w  w. j a  v  a 2  s. co  m*/
            return receiver;
    }
}

Related

  1. rangeDivide(Integer begin, Integer end, Integer divideNum)
  2. rangeEquals(byte[] a, int aStart, byte[] b, int bStart, int length)
  3. rangeIncludes(long x, long min, long max)
  4. rangeInteger(Integer num, Integer min, Integer max)
  5. rangeLimit(float value, float min, float max)
  6. rangeOfByteArray(byte[] data, int offset, int length)
  7. rangeToScale(long rawValue, long rangeMin, long rangeMax, double scaleMin, double scaleMax)