/** * Creates an instance of {@link ObjectGenerator} which generates values in order they are specified. When values * are depleted, it starts again from the beginning of the list. * * @param values List of values. * @param <T> Type instance of {@link ObjectGenerator} will generate. * @return An instance of {@link ObjectGenerator} which generates values in order they are specified. */ @SafeVarargs public static <T> ObjectGenerator<T> circular(T... values) { return circular(Arrays.asList(values)); }
/** * Creates an instance of {@link ObjectGenerator} which generates values in order they are specified. When values * are depleted, it starts again from the beginning of the list. * * @param values List of values. * @param <T> Type instance of {@link ObjectGenerator} will generate. * @return An instance of {@link ObjectGenerator} which generates values in order they are specified. */ @SafeVarargs public static <T> ObjectGenerator<T> circular(T... values) { return circular(Arrays.asList(values)); }