|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcsli.util.FuzzyBoolean
public class FuzzyBoolean
Contains a probability. Can still function in place of a Boolean, based on a threshold.
| Field Summary | |
|---|---|
static FuzzyBoolean |
FALSE
|
static double |
THRESHOLD
|
static FuzzyBoolean |
TRUE
|
| Constructor Summary | |
|---|---|
FuzzyBoolean(boolean value)
Allocates a FuzzyBoolean based on the boolean flag |
|
FuzzyBoolean(double probability)
Allocates a FuzzyBoolean with the specified probability |
|
FuzzyBoolean(String s)
Allocates a FuzzyBoolean representing a value argument |
|
| Method Summary | |
|---|---|
boolean |
booleanValue()
|
boolean |
equals(Object o)
True if the object is a FuzzyBoolean with the same probability |
double |
getProbability()
Returns the probability of this boolean. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double THRESHOLD
public static final FuzzyBoolean TRUE
public static final FuzzyBoolean FALSE
| Constructor Detail |
|---|
public FuzzyBoolean(String s)
s - string "true", "false" or a double value between 0 and 1, e.g.
0.50public FuzzyBoolean(boolean value)
value - if true, probability is 1, if false, 0public FuzzyBoolean(double probability)
probability - should be in [0,1], set to either 0 of 1 if outside| Method Detail |
|---|
public double getProbability()
public boolean booleanValue()
public boolean equals(Object o)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||