public class BooleanRandomField extends Object implements RandomField
RandomField representing a Boolean or it's primitive counterpart.RND| Constructor and Description |
|---|
BooleanRandomField() |
| Modifier and Type | Method and Description |
|---|---|
double |
getNullProbability()
Returns the probability for this field returning null.
|
double |
getTrueProbability()
Returns the probability for this field returning true.
|
Boolean |
nextValue()
Returns a random value.
|
BooleanRandomField |
nullProbability(double newNullProbability)
Sets the probability for this field returning null.
|
void |
setNullProbability(double nullProbability)
Sets the probability for this field returning null.
|
void |
setTrueProbability(double trueProbability)
Sets the probability for this field returning true.
|
BooleanRandomField |
trueProbability(double newTrueProbability)
Sets the probability for this field returning true.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitpublic Boolean nextValue()
RandomFieldnextValue in interface RandomFieldpublic double getNullProbability()
nextValue() is null, if it is 1 then every nextValue() is null.public BooleanRandomField nullProbability(double newNullProbability)
nextValue() is null, if it is 1 then every nextValue() is null.newNullProbability - the probability between 0 and 1public void setNullProbability(double nullProbability)
nextValue() is null, if it is 1 then every nextValue() is null.nullProbability - the probability between 0 and 1public double getTrueProbability()
nextValue() is true, if it is 1 then every nextValue() is true.public BooleanRandomField trueProbability(double newTrueProbability)
nextValue() is true, if it is 1 then every nextValue() is true.newTrueProbability - the probability between 0 and 1public void setTrueProbability(double trueProbability)
nextValue() is true, if it is 1 then every nextValue() is true.trueProbability - the probability between 0 and 1Copyright © 2020. All rights reserved.