shell
Class Switch

java.lang.Object
  |
  +--shell.Switch

public class Switch
extends java.lang.Object

Switch.java James Horsley 2/6/2001 This program encapsulates a command line switch. requiresParameter determins whether the switch requires a follow up parameter, if so then the program containing the switch will take in the next value. active is not currently being used. value is the value of the required parameter, accessible through getValue(), or toString(). toString() added so that type conversion is not need from Object.


Field Summary
 boolean active
           
 boolean requiresParameter
           
 java.lang.String value
           
 
Constructor Summary
Switch(boolean reqParam)
           
Switch(boolean reqParam, boolean active, java.lang.String val)
           
Switch(boolean reqParam, java.lang.String val)
           
 
Method Summary
 boolean getRequiresParameter()
           
 java.lang.String getValue()
           
 void setRequiresParameter(boolean reqParam)
           
 void setValue(java.lang.String value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

requiresParameter

public boolean requiresParameter

active

public boolean active

value

public java.lang.String value
Constructor Detail

Switch

public Switch(boolean reqParam,
              boolean active,
              java.lang.String val)

Switch

public Switch(boolean reqParam,
              java.lang.String val)

Switch

public Switch(boolean reqParam)
Method Detail

setValue

public void setValue(java.lang.String value)

getValue

public java.lang.String getValue()

setRequiresParameter

public void setRequiresParameter(boolean reqParam)

getRequiresParameter

public boolean getRequiresParameter()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object