removed unnecessary file
This commit is contained in:
parent
4495b45d0b
commit
fdf79fdd87
|
@ -1,17 +0,0 @@
|
|||
package com.baeldung.enums;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class RandomEnumGenerator<T extends Enum<T>> {
|
||||
|
||||
private static final Random PRNG = new Random();
|
||||
private final T[] values;
|
||||
|
||||
public RandomEnumGenerator(Class<T> e) {
|
||||
values = e.getEnumConstants();
|
||||
}
|
||||
|
||||
public T randomEnum() {
|
||||
return values[PRNG.nextInt(values.length)];
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue