void checkLabel ( final Label label , final boolean checkVisited , final String msg ) { if ( label == null ) { throw new IllegalArgumentException ( "Invalid " + msg + " (must not be null)" ) ; } if ( checkVisited && labels . get ( label ) == null ) { throw new IllegalArgumentException ( "Invalid " + msg + " (must be visited first)" ) ; } }
Checks that the given label is not null . This method can also check that the label has been visited .