protected void requireVariableValues(String... names){
  StringBuilder missing=new StringBuilder();
  for (  String name : names) {
    if (!hasVariableValue(name)) {
      if (missing.length() > 0) {
        missing.append(", ");
      }
      missing.append(name);
    }
  }
  if (missing.length() > 0) {
    throw new CommandException("Missing required value(s): " + missing);
  }
}

protected void requireVariableValues ( String ... names ) { StringBuilder missing = new StringBuilder ( ) ; for ( String name : names ) { if ( ! hasVariableValue ( name ) ) { if ( missing . length ( ) > 0 ) { missing . append ( ", " ) ; } missing . append ( name ) ; } } if ( missing . length ( ) > 0 ) { throw new CommandException ( "Missing required value(s): " + missing ) ; } }
requires that the specified variable values are set .
