rj.tools.jcsc
Class TriStateBoolean
java.lang.Object
|
+--rj.tools.jcsc.TriStateBoolean
- public class TriStateBoolean
- extends java.lang.Object
TriStateBoolean
is a boolean which can have
three states - true, false, either.
- Version:
- $Revision: 1.2 $
- Author:
- Ralph Jocham
Field Summary |
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 Summary |
TriStateBoolean(java.lang.String state)
TriStateBoolean creates a new TriStateBoolean instance |
Method Summary |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TRUE
public static final java.lang.String TRUE
- boolean
TRUE
FALSE
public static final java.lang.String FALSE
- boolean
FALSE
EITHER
public static final java.lang.String EITHER
EITHER
- either boolean true or false
TriStateBoolean
public TriStateBoolean(java.lang.String state)
TriStateBoolean
creates a new TriStateBoolean instance
- Parameters:
state
- a String
value which can be either true,
false or either. (i.e. TriStateBoolean.TRUE)
getState
public java.lang.String getState()
getState
returns the current state
- Returns:
- a
String
value; true, false or either
isTrue
public boolean isTrue()
isTrue
indicates whether the state is true
- Returns:
- a
boolean
value
isFalse
public boolean isFalse()
isFalse
indicates whether the state is false
- Returns:
- a
boolean
value
isEither
public boolean isEither()
isEither
indicates whether the state is either
- Returns:
- a
boolean
value
(c) 1999-2004 by Ralph Jocham (rjocham72@netscape.net)
JCSC is released under the terms of the GNU General Public License