public static void checkIntInRange ( int index , int start , int end ) { if ( index < start ) { throw new IndexOutOfBoundsException ( ExceptionMessageMap . getMessage ( "000006" ) + " { index=[" + index + "], start=[" + start + "], end=[" + end + "] }" ) ; } if ( index >= end ) { throw new IndexOutOfBoundsException ( ExceptionMessageMap . getMessage ( "000006" ) + " { index=[" + index + "], start=[" + start + "], end=[" + end + "] }" ) ; } }
A general range check utility for checking whether a given &lt ; integer&gt ; value is between a given start and end indexes . This is a helper method for other methods such as checkIntIndexInListRange or can also be used independently by external objects .