Here you can find the source of rangeCheck(int value, int begin, int end)
private static int rangeCheck(int value, int begin, int end)
//package com.java2s; /* (c) 2014 Open Source Geospatial Foundation - all rights reserved * This code is licensed under the GPL 2.0 license, available at the root * application directory.//w ww.j a v a 2 s.co m */ public class Main { private static int rangeCheck(int value, int begin, int end) { if (value >= begin && value <= end) { // (begin,end] return value; } throw new IllegalArgumentException("Value [" + value + "] not in range [" + begin + "," + end + "]"); } }