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.
Constructor Summary |
Switch(boolean reqParam)
|
Switch(boolean reqParam,
boolean active,
java.lang.String val)
|
Switch(boolean reqParam,
java.lang.String val)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
requiresParameter
public boolean requiresParameter
active
public boolean active
value
public java.lang.String value
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)
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