|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectopendap.util.OptSwitch
public class OptSwitch
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)
Field Summary | |
---|---|
protected static int |
BOOL
|
protected static int |
NONE
|
boolean |
set
|
java.lang.String |
val
|
protected static int |
VAL
|
Constructor Summary | |
---|---|
OptSwitch()
|
|
OptSwitch(java.lang.Character c,
int type)
Invocation with explicit Character switchname and type |
|
OptSwitch(int c,
int type)
Invocation with explicit integer switchname and type |
Method Summary | |
---|---|
boolean |
acceptVal()
Return whether the option switch accepts values or no |
void |
SetHasValue(int type)
Set the value type of the option switch to the type passed |
void |
SetVal(boolean b)
Set the 'set' field of the option switch to 'b'. |
void |
SetVal(java.lang.String s)
Set the 'val' field of the option switch to 's'. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int NONE
protected static final int BOOL
protected static final int VAL
public boolean set
public java.lang.String val
Constructor Detail |
---|
public OptSwitch()
public OptSwitch(java.lang.Character c, int type)
c
- type
- public OptSwitch(int c, int type)
c
- type
- Method Detail |
---|
public void SetHasValue(int type)
type
- type of value that switch may accept or bepublic boolean acceptVal()
public void SetVal(boolean b)
b
- set the 'set' boolean field to 'b'.public void SetVal(java.lang.String s)
s
- string to assign to 'val' field.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |