public static void trueValue(final boolean value,final String name){
  if (!value) {
    final String message=String.format("%s must be true",name);
    throw new IllegalArgumentException(message);
  }
}

public static void trueValue ( final boolean value , final String name ) { if ( ! value ) { final String message = String . format ( "%s must be true" , name ) ; throw new IllegalArgumentException ( message ) ; } }
throws an exception if the specified value is not true .
