public NameCallback(String prompt,
String defaultName) {
if (prompt == null || prompt.length() == 0 ||
defaultName == null || defaultName.length() == 0)
throw new IllegalArgumentException();
this.prompt = prompt;
this.defaultName = defaultName;
}
Construct a NameCallback with a prompt
and default name.
Parameters:
prompt - the prompt used to request the information.
defaultName - the name to be used as the default name displayed
with the prompt.
Throws:
IllegalArgumentException - if prompt is null,
if prompt has a length of 0,
if defaultName is null,
or if defaultName has a length of 0.
- exception:
IllegalArgumentException - if prompt is null,
if prompt has a length of 0,
if defaultName is null,
or if defaultName has a length of 0.
|