public class ArrayRandomField extends Object implements RandomField
RandomField representing an array.RND| Constructor and Description |
|---|
ArrayRandomField(Class<?> elementClass,
RandomField elementRandomField)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ArrayRandomField |
arrayLength(int newArrayLength)
Sets the standard array length.
|
int |
getArrayLength()
Returns the standard array length.
|
double |
getNullProbability()
Returns the probability for this field returning null.
|
Object |
nextValue()
Returns a random value.
|
ArrayRandomField |
nullProbability(double newNullProbability)
Sets the probability for this field returning null.
|
void |
setArrayLength(int arrayLength)
Sets the standard array length.
|
void |
setNullProbability(double nullProbability)
Sets the probability for this field returning null.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitpublic ArrayRandomField(Class<?> elementClass, RandomField elementRandomField)
elementClass - the element's classelementRandomField - a generator for the elementspublic Object nextValue()
RandomFieldnextValue in interface RandomFieldpublic double getNullProbability()
nextValue() is null, if it is 1 then every nextValue() is null.public ArrayRandomField 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 int getArrayLength()
public ArrayRandomField arrayLength(int newArrayLength)
newArrayLength - array lengthpublic void setArrayLength(int arrayLength)
arrayLength - array lengthCopyright © 2020. All rights reserved.