Methods Summary |
---|
void | displayEnv()
final Iterator iter = getEnvKeys().iterator();
while ( iter.hasNext() )
{
final String name = (String)iter.next();
final Object value = envGet( name );
if ( value instanceof String )
{
println( name + "=" + value );
}
}
|
void | executeInternal()
final String [] operands = getOperands();
if ( operands.length == 0 )
{
displayEnv();
}
else if ( operands.length == 1 )
{
final String oper = operands[ 0 ];
final int delimIndex = oper.indexOf( DELIM );
if ( delimIndex > 0 )
{
final String name = oper.substring( 0, delimIndex );
final String value = oper.substring( delimIndex + 1, oper.length() );
envPut( name, value, true );
}
else
{
if ( envGet( oper ) != null )
{
envRemove( oper );
println( "Variable " + oper + " removed." );
}
else
{
println( "Variable " + oper + " does not exist." );
}
}
}
else
{
printUsage();
}
|
public static java.lang.String[] | getNames()
return( new String [] { NAME } );
|
int | getNumRequiredOperands()
return( 0 );
|
ArgHelper.OptionsInfo | getOptionInfo()
return( new ArgHelperOptionsInfo( OPTIONS_INFO ) );
|
java.lang.String | getUsage()
return( CmdStrings.SETENV_HELP.toString() );
//return( CmdStrings.SETENV_HELP.toString() );
|