public boolean isVisited ( int from , int upTo ) { if ( checkBounds ( from ) && checkBounds ( upTo - 1 ) ) { // perform the visit check // for ( int i = from ; i < upTo ; i ++ ) { if ( ONE == this . registry [ i ] ) { return true ; } } return false ; } else { throw new RuntimeException ( "The location " + from + "," + upTo + " out of bounds [0," + ( this . registry . length - 1 ) + "]" ) ; } }
Check if the interval and its boundaries were visited .