N
- a type of numberpublic abstract class AbstractNumberRandomField<N extends Number> extends Object implements RandomField
RandomField
from a Number
.RND
Constructor and Description |
---|
AbstractNumberRandomField() |
Modifier and Type | Method and Description |
---|---|
AbstractNumberRandomField<N> |
endValue(N newEndValue)
Sets the end value, i.e.
|
N |
getEndValue()
Returns the end value, i.e.
|
double |
getNullProbability()
Returns the probability for this field returning null.
|
N |
getStartValue()
Returns the start value, i.e.
|
N |
nextValue()
Returns a random value.
|
AbstractNumberRandomField<N> |
nullProbability(double newNullProbability)
Sets the probability for this field returning null.
|
void |
setEndValue(N endValue)
Sets the end value, i.e.
|
void |
setNullProbability(double nullProbability)
Sets the probability for this field returning null.
|
void |
setStartValue(N startValue)
Sets the start value, i.e.
|
AbstractNumberRandomField<N> |
startValue(N newStartValue)
Sets the start value, i.e.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
init
public N nextValue()
RandomField
nextValue
in interface RandomField
public N getStartValue()
nextValue()
will always be greater than this
value.public AbstractNumberRandomField<N> startValue(N newStartValue)
nextValue()
will always be greater than this
value.newStartValue
- the start valuepublic void setStartValue(N startValue)
nextValue()
will always be greater than this
value.startValue
- the start valuepublic N getEndValue()
nextValue()
will always be less than this value.public AbstractNumberRandomField<N> endValue(N newEndValue)
nextValue()
will always be less than this value.newEndValue
- the end valuepublic void setEndValue(N endValue)
nextValue()
will always be less than this value.endValue
- the end valuepublic double getNullProbability()
nextValue()
is null, if it is 1 then every nextValue()
is null.public AbstractNumberRandomField<N> 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.