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)");
        }
    }
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.

@param label
the label to be checked.
@param checkVisited
<tt>true</tt> to check that the label has been visited.
@param msg
a message to be used in case of error.