public class TriStateBoolean
extends java.lang.Object
TriStateBoolean
is a boolean which can have
three states - true, false, either.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EITHER
EITHER - either boolean true or false |
static java.lang.String |
FALSE
boolean
FALSE |
static java.lang.String |
TRUE
boolean
TRUE |
Constructor and Description |
---|
TriStateBoolean(java.lang.String state)
TriStateBoolean creates a new TriStateBoolean instance |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getState()
getState returns the current state |
boolean |
isEither()
isEither indicates whether the state is either |
boolean |
isFalse()
isFalse indicates whether the state is false |
boolean |
isTrue()
isTrue indicates whether the state is true |
public static final java.lang.String TRUE
TRUE
public static final java.lang.String FALSE
FALSE
public static final java.lang.String EITHER
EITHER
- either boolean true or falsepublic TriStateBoolean(java.lang.String state)
TriStateBoolean
creates a new TriStateBoolean instancestate
- a String
value which can be either true,
false or either. (i.e. TriStateBoolean.TRUE)public java.lang.String getState()
getState
returns the current stateString
value; true, false or eitherpublic boolean isTrue()
isTrue
indicates whether the state is trueboolean
valuepublic boolean isFalse()
isFalse
indicates whether the state is falseboolean
valuepublic boolean isEither()
isEither
indicates whether the state is eitherboolean
value
JCSC is released under the terms of the GNU General Public License