public class CalendarRandomField extends Object
RandomField representing a Calendar between 10 years ago and 10 years in the future.RND| Constructor and Description |
|---|
CalendarRandomField() |
| Modifier and Type | Method and Description |
|---|---|
CalendarRandomField |
endValue(Calendar newEndValue)
Sets the highest possible value for this field.
|
C |
getEndValue()
Returns the highest possible value for this field.
|
double |
getNullProbability()
Returns the probability for this field returning null.
|
C |
getStartValue()
Returns the lowest possible value for this field.
|
C |
nextValue()
Returns a random value.
|
de.slothsoft.random.types.AbstractChronoRandomField<C> |
nullProbability(double newNullProbability)
Sets the probability for this field returning null.
|
void |
setEndValue(C endValue)
Sets the highest possible value for this field.
|
void |
setNullProbability(double nullProbability)
Sets the probability for this field returning null.
|
void |
setStartValue(C startValue)
Sets the lowest possible value for this field.
|
CalendarRandomField |
startValue(Calendar newStartValue)
Sets the lowest possible value for this field.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitpublic CalendarRandomField endValue(Calendar newEndValue)
newEndValue - end valuepublic CalendarRandomField startValue(Calendar newStartValue)
newStartValue - start valuepublic C nextValue()
RandomFieldnextValue in interface RandomFieldpublic C getEndValue()
public void setEndValue(C endValue)
endValue - end valuepublic C getStartValue()
public void setStartValue(C startValue)
startValue - start valuepublic double getNullProbability()
nextValue() is null, if it is 1 then every nextValue() is null.public de.slothsoft.random.types.AbstractChronoRandomField<C> 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 1Copyright © 2020. All rights reserved.