Examples of arbitrary()


Examples of ar.edu.unlp.yaqc4j.generators.java.lang.ByteGen.arbitrary()

      final long maxsize) {
    ByteGen gen = new ByteGen();
    byte[] bytes = new byte[new PositiveIntegerGen().arbitrary(random,
        minsize, Math.min(maxsize, 2000))]; // FIXME: arbitrary length of this array to avoid OutOfMemoryError
    for (int i = 0; i < bytes.length; i++) {
      bytes[i] = gen.arbitrary(random, minsize, maxsize);
    }
    return new BigInteger(new PositiveIntegerGen().arbitrary(random,
        minsize, maxsize) > 0 ? 1 : -1, bytes);
  }
}
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.