FileDocCategorySizeDatePackage
GetOptDesc.javaAPI DocExample841Fri Nov 14 13:39:46 GMT 2003com.darwinsys.lang

GetOptDesc

public class GetOptDesc extends Object
A GetOptDesc describes one argument that may be accepted by the program.

Fields Summary
protected char
argLetter
The short-form option letter
protected String
argName
The long-form option name
protected boolean
takesArgument
True if this option needs an argument after it
Constructors Summary
public GetOptDesc(char ch, String nm, boolean ta)
Construct a GetOpt option.

param
ch The single-character name for this option.
param
nm The word name for this option.
param
ta True if this option requires an argument after it.

		if (!Character.isLetter(ch) && !Character.isDigit(ch)) {
			throw new IllegalArgumentException(ch + ": not letter or digit");
		}
		argLetter = ch;
		argName   = nm;	// may be null, meaning no long name.
		takesArgument = ta;
	
Methods Summary