public void assertAtLeastOneDefined ( final String param1 , final String param2 ) { if ( ! isPresent ( param1 ) && ! isPresent ( param2 ) ) { throw new ParameterException ( String . format ( "At least one of %s and %s must be defined." , param1 , param2 ) ) ; } }
Throws a ParameterException if neither parameter is defined .