Here you can find the source of rangeLimit(int receiver, int minBound, int maxBound)
public static int rangeLimit(int receiver, int minBound, int maxBound)
//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; } }