Skip to content

Commit b98e67d

Browse files
committed
pmd fix: add FunctionalInterface annotation
1 parent 345a3a0 commit b98e67d

14 files changed

Lines changed: 15 additions & 0 deletions

File tree

commons-rng-client-api/src/main/java/org/apache/commons/rng/UniformRandomProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
*
2727
* @since 1.0
2828
*/
29+
@FunctionalInterface
2930
public interface UniformRandomProvider {
3031
/**
3132
* Generates {@code byte} values and places them into a user-supplied array.

commons-rng-core/src/main/java/org/apache/commons/rng/core/source32/RandomIntSource.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
*
2323
* @since 1.0
2424
*/
25+
@FunctionalInterface
2526
public interface RandomIntSource {
2627
/**
2728
* Return the next random value.

commons-rng-core/src/main/java/org/apache/commons/rng/core/source64/RandomLongSource.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
*
2323
* @since 1.0
2424
*/
25+
@FunctionalInterface
2526
public interface RandomLongSource {
2627
/**
2728
* Return the next random value.

commons-rng-core/src/main/java/org/apache/commons/rng/core/util/RandomStreams.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public final class RandomStreams {
4040
* @param <T> the object type
4141
* @since 1.5
4242
*/
43+
@FunctionalInterface
4344
public interface SeededObjectFactory<T> {
4445
/**
4546
* Creates the object.

commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/CompositeSamplers.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public final class CompositeSamplers {
7373
* <a href="http://en.wikipedia.org/wiki/Probability_distribution#Discrete_probability_distribution">
7474
* discrete probability distribution</a>.
7575
*/
76+
@FunctionalInterface
7677
public interface DiscreteProbabilitySamplerFactory {
7778
/**
7879
* Creates the sampler.
@@ -273,6 +274,7 @@ enum Specialisation {
273274
*
274275
* @param <S> Type of sampler
275276
*/
277+
@FunctionalInterface
276278
interface SamplerFactory<S> {
277279
/**
278280
* Creates a new composite sampler.

commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/ObjectSampler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* @param <T> Type of the sample.
2626
* @since 1.4
2727
*/
28+
@FunctionalInterface
2829
public interface ObjectSampler<T> {
2930
/**
3031
* Create an object sample.

commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/SharedStateSampler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* @param <R> Type of the sampler.
2727
* @since 1.3
2828
*/
29+
@FunctionalInterface
2930
public interface SharedStateSampler<R> {
3031
/**
3132
* Create a new instance of the sampler with the same underlying state using the given

commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/ContinuousInverseCumulativeProbabilityFunction.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*
2424
* @since 1.0
2525
*/
26+
@FunctionalInterface
2627
public interface ContinuousInverseCumulativeProbabilityFunction {
2728
/**
2829
* Computes the quantile function of the distribution.

commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/ContinuousSampler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*
2424
* @since 1.0
2525
*/
26+
@FunctionalInterface
2627
public interface ContinuousSampler {
2728
/**
2829
* Creates a {@code double} sample.

commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/DiscreteInverseCumulativeProbabilityFunction.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*
2424
* @since 1.0
2525
*/
26+
@FunctionalInterface
2627
public interface DiscreteInverseCumulativeProbabilityFunction {
2728
/**
2829
* Computes the quantile function of the distribution.

0 commit comments

Comments
 (0)