MATH-916
Restore backwards-compatibility (for release 3.1). git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1421911 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
29a297de44
commit
6f806cfe41
|
@ -94,13 +94,14 @@ import org.apache.commons.math3.exception.OutOfRangeException;
|
|||
* @deprecated to be removed in 4.0. Use {@link RandomDataGenerator} instead
|
||||
* @version $Id$
|
||||
*/
|
||||
@Deprecated
|
||||
public class RandomDataImpl implements RandomData, Serializable {
|
||||
|
||||
/** Serializable version identifier */
|
||||
private static final long serialVersionUID = -626730818244969716L;
|
||||
|
||||
/** RandomDataGenerator delegate */
|
||||
private RandomDataGenerator delegate;
|
||||
private final RandomDataGenerator delegate;
|
||||
|
||||
/**
|
||||
* Construct a RandomDataImpl, using a default random generator as the source
|
||||
|
@ -126,6 +127,15 @@ public class RandomDataImpl implements RandomData, Serializable {
|
|||
delegate = new RandomDataGenerator(rand);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rand the source of (non-secure) random data
|
||||
* @deprecated To be removed in 4.0.
|
||||
*/
|
||||
@Deprecated
|
||||
RandomDataGenerator getDelegate() {
|
||||
return delegate;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
|
|
|
@ -98,15 +98,26 @@ public class ValueServer {
|
|||
}
|
||||
|
||||
/**
|
||||
* Construct a ValueServer instance using a RandomDataImpl as its source
|
||||
* Construct a ValueServer instance using a RandomDataGenerator as its source
|
||||
* of random data.
|
||||
*
|
||||
* @param randomData the RandomDataImpl instance used to source random data
|
||||
* @param randomData random data source
|
||||
* @since 3.0
|
||||
*/
|
||||
public ValueServer(RandomDataGenerator randomData) {
|
||||
this.randomData = randomData;
|
||||
}
|
||||
/**
|
||||
* Construct a ValueServer instance using a RandomDataImpl as its source
|
||||
* of random data.
|
||||
*
|
||||
* @param randomData random data source
|
||||
* @deprecated As of 3.1. Use {@link #ValueServer(RandomDataGenerator)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public ValueServer(RandomDataImpl randomData) {
|
||||
this(randomData.getDelegate());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the next generated value, generated according
|
||||
|
|
Loading…
Reference in New Issue