private static void checkPreconditions ( final List < String > forbiddenSubStrings ) { if ( forbiddenSubStrings == null ) { throw new NullPointerException ( "forbiddenSubStrings list should not be null" ) ; } else if ( forbiddenSubStrings . isEmpty ( ) ) { throw new IllegalArgumentException ( "forbiddenSubStrings list should not be empty" ) ; } }
Checks the preconditions for creating a new ForbidSubStr processor with a List of forbidden substrings .