|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectau.gov.tas.dpiwe.mr.util.TriState
public class TriState
A value which has three states, one positive, one negative and one neutral. e.g. yes, no, don't know; true, false, maybe true.
| Field Summary | |
|---|---|
protected int |
state
The state of this tri-state. |
static int |
State_Negative
The negative state. |
static int |
State_Neutral
The ambiguous state betwen positive and negative. |
static int |
State_Positive
The positive state. |
| Constructor Summary | |
|---|---|
TriState()
Creates a new instance of TriState. |
|
TriState(int state)
Creates a new instance of TriState. |
|
TriState(String flg)
Creates a new instance of TriState. |
|
| Method Summary | |
|---|---|
String |
getFlg()
Returns the flag text of this tri-state. |
int |
getState()
Returns the state of this tri-state. |
boolean |
isNegative()
Returns true for a negative state. |
boolean |
isNeutral()
Returns true for a neutral state. |
boolean |
isPositive()
Returns true for a positive state. |
void |
setFlg(String flg)
Alters the state of this tri-state. |
void |
setState(int state)
Alters the state of this tri-state. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int state
public static final int State_Neutral
public static final int State_Negative
public static final int State_Positive
| Constructor Detail |
|---|
public TriState()
public TriState(int state)
state - the initial state of this tri-state.public TriState(String flg)
flg - "Y" for positive state, "N" for negative state, null for neutral.| Method Detail |
|---|
public int getState()
public void setState(int state)
state - the state of this tri-state.public String getFlg()
public void setFlg(String flg)
flg - "Y" for positive state, "N" for negative state, null for neutral.public boolean isNeutral()
public boolean isNegative()
public boolean isPositive()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||