public class Probability extends Object
Modifier and Type | Field and Description |
---|---|
static Probability |
ONE |
static Probability |
ZERO |
Constructor and Description |
---|
Probability(double probability)
Creates an object with given probability
|
Modifier and Type | Method and Description |
---|---|
void |
decrease()
Sets the probability to zero until the timer restores it.
|
static double |
defaultValue()
Calculates default probability value
|
void |
increase()
Increases the probability
|
String |
toString()
Returns string probability representation
|
double |
value()
Returns the probability value
|
public static final Probability ZERO
public static final Probability ONE
public Probability(double probability)
public double value()
public static double defaultValue()
public void decrease()
public void increase()