Package opendap.dts
Class OptSwitch
- java.lang.Object
-
- opendap.dts.OptSwitch
-
public class OptSwitch extends Object
OptSwitch - class definition for Switches Description: this class defines a switch element. a switch is considered to be used (having been set or assigned a value if the 'set' field is false AND the 'val' field is null. Constants: Permitted values for 'type' field: protected static final int NONE uninitialized protected static final int BOOL boolean type switch protected static final int VAL value type switch Fields: sw the switch name type boolean/value set value is set/clear val switch value (not applicable to boolean type switch)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptVal()Return whether the option switch accepts values or novoidSetHasValue(int type)Set the value type of the option switch to the type passedvoidSetVal(boolean b)Set the 'set' field of the option switch to 'b'.voidSetVal(String s)Set the 'val' field of the option switch to 's'.
-
-
-
Field Detail
-
NONE
protected static final int NONE
- See Also:
- Constant Field Values
-
BOOL
protected static final int BOOL
- See Also:
- Constant Field Values
-
VAL
protected static final int VAL
- See Also:
- Constant Field Values
-
set
public boolean set
-
val
public String val
-
-
Constructor Detail
-
OptSwitch
public OptSwitch()
-
OptSwitch
public OptSwitch(Character c, int type)
Invocation with explicit Character switchname and type- Parameters:
c-type-
-
OptSwitch
public OptSwitch(int c, int type)Invocation with explicit integer switchname and type- Parameters:
c-type-
-
-
Method Detail
-
SetHasValue
public void SetHasValue(int type)
Set the value type of the option switch to the type passed- Parameters:
type- type of value that switch may accept or be
-
acceptVal
public boolean acceptVal()
Return whether the option switch accepts values or no
-
SetVal
public void SetVal(boolean b)
Set the 'set' field of the option switch to 'b'.- Parameters:
b- set the 'set' boolean field to 'b'.
-
SetVal
public void SetVal(String s)
Set the 'val' field of the option switch to 's'.- Parameters:
s- string to assign to 'val' field.
-
-