Examples of IntegerGenerator


Examples of com.yahoo.ycsb.generator.IntegerGenerator

        System.out.println("persisted");
    }

    private HashMap<String, ByteIterator> buildValues()
    {
        IntegerGenerator fieldlengthgenerator = new ZipfianGenerator(1, 4);
        HashMap<String, ByteIterator> values = new HashMap<String, ByteIterator>();

        for (int i = 0; i < 4; i++)
        {
            String fieldkey = "field" + i;
            ByteIterator data = new RandomByteIterator(fieldlengthgenerator.nextInt());
            values.put(fieldkey, data);
        }
        return values;
    }
View Full Code Here

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

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

  /**
   * 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

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

   *            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

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

  /**
   * 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

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

   * 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

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

  /**
   * 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

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

  /**
   * 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

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

   * 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

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

  /**
   * 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
TOP
Copyright © 2018 www.massapi.com. 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.