All Downloads are FREE. Search and download functionalities are using the official Maven repository.

autofixture.publicinterface.inline.CharacterGenerator Maven / Gradle / Ivy

The newest version!
package autofixture.publicinterface.inline;

import autofixture.implementationdetails.CircularList;
import autofixture.interfaces.FixtureContract;
import autofixture.interfaces.InlineInstanceGenerator;

public class CharacterGenerator implements
    InlineInstanceGenerator {
  private final CircularList letters;

  public CharacterGenerator(final String possibleCharacters) {
    this.letters = CircularList
        .fromCharactersIn(possibleCharacters);
  }

  @Override
  public Character next(final FixtureContract fixture) {
    return letters.next();
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy