src/SequenceDNA.java
/**
     * Check sequence for valid characters
     * throws IllegalArgumentException if invalid character found  
     */
Check sequence for valid characters
throws IllegalArgumentException if invalid character found
Check sequence for valid characters throws IllegalArgumentException if invalid character found
private void checkSequence() {
        Pattern pattern = Pattern.compile(NOT_VALID_CHARACTERS);
        Matcher matcher = pattern.matcher(sequence);
        if (matcher.find()) {
            throw new IllegalArgumentException("Illegal character in sequence");
        }  
    }
private void checkSequence ( ) { Pattern pattern = Pattern . compile ( NOT_VALID_CHARACTERS ) ; Matcher matcher = pattern . matcher ( sequence ) ; if ( matcher . find ( ) ) { throw new IllegalArgumentException ( "Illegal character in sequence" ) ; } }
Check sequence for valid characters
 throws IllegalArgumentException if invalid character found
Check sequence for valid characters throws IllegalArgumentException if invalid character found