Package net.java.quickcheck.generator.support

Examples of net.java.quickcheck.generator.support.IntegerGenerator


   * @param high
   *            max size
   */
  public static <T> Generator<List<T>> lists(Generator<T> content, int low,
      int high) {
    return lists(content, new IntegerGenerator(low, high));
  }
View Full Code Here


  /**
   * Create a new string generator which generates strings of characters from
   * the given string with a length between min and max.
   */
  public static ExtendibleGenerator<Character, String> strings(String allowedCharacters, int min, int max) {
    return new StringGenerator(new IntegerGenerator(min, max), characters(allowedCharacters));
  }
View Full Code Here

   *            lower size boundary
   * @param max
   *            upper size boundary
   */
  public static ExtendibleGenerator<Character, String> strings(int min, int max) {
    return new StringGenerator(new IntegerGenerator(min, max), new CharacterGenerator());
  }
View Full Code Here

  /**
   * Create a new string generator which creates strings with sizes ranging
   * from loLengh to hiLength of characters from a-z and A-Z.
   */
  public static ExtendibleGenerator<Character, String> letterStrings(int min, int max) {
    StringGenerator generator = new StringGenerator(new IntegerGenerator(min, max), characters('a', 'z'));
    return generator.add(characters('A', 'Z'));
  }
View Full Code Here

   * Create a new integer generator which creates integers ranging from
   * {@link Integer#MIN_VALUE} to {@link Integer#MAX_VALUE}.
   *
   */
  public static Generator<Integer> integers() {
    return new IntegerGenerator();
  }
View Full Code Here

  /**
   * Create a new integer generator which creates integers that are at equal
   * or greater than low.
   */
  public static Generator<Integer> integers(int low) {
    return new IntegerGenerator(low, Integer.MAX_VALUE);
  }
View Full Code Here

  /**
   * Create a new integer generator which creates integers ranging from lo to
   * hi.
   */
  public static Generator<Integer> integers(int lo, int hi) {
    return new IntegerGenerator(lo, hi);
  }
View Full Code Here

   * Create a new integer generator which creates integers ranging from lo to
   * hi based on the given {@link Distribution}.
   */
  public static Generator<Integer> integers(int lo, int hi,
      Distribution distribution) {
    return new IntegerGenerator(lo, hi, distribution);
  }
View Full Code Here

  /**
   * Create a new integer generator which creates positive integers than are
   * equal or smaller than high.
   */
  public static Generator<Integer> positiveIntegers(int high) {
    return new IntegerGenerator(1, high);
  }
View Full Code Here

   * @param high
   *            max size
   */
  public static <T> Generator<List<T>> lists(Generator<? extends T> content, int low,
      int high) {
    return lists(content, new IntegerGenerator(low, high));
  }
View Full Code Here

TOP

Related Classes of net.java.quickcheck.generator.support.IntegerGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.