Tabnine Logo
CombinedGenerators.sortedLists
Code IndexAdd Tabnine to your IDE (free)

How to use
sortedLists
method
in
net.java.quickcheck.generator.CombinedGenerators

Best Java code snippets using net.java.quickcheck.generator.CombinedGenerators.sortedLists (Showing top 2 results out of 315)

origin: lenskit/lenskit

/**
 * Method to compute the data points. Split out so that errors it throws get reported.
 */
@BeforeClass
public static void makeDataPoints() {
  KeyData[] data = new KeyData[10];
  Generator<Long> intGen = longs(Integer.MIN_VALUE, Integer.MAX_VALUE);
  Generator<Long> longGen = longs(Integer.MAX_VALUE + 1L, Long.MAX_VALUE);
  for (int i = 0; i < 10; i++) {
    Generator<List<Long>> listGen;
    if (i % 2 == 0) {
      // generate ints
      listGen = sortedLists(uniqueValues(intGen), 25, 25);
    } else {
      // generate longs
      listGen = sortedLists(uniqueValues(longGen), 25, 25);
    }
    List<Long> nums = listGen.next();
    data[i] = new KeyData(nums);
  }
  DATA_POINTS = data;
}
origin: net.java.quickcheck/quickcheck

/**
 * Create a generator of sorted lists with values from the content
 * generator. Length is between high and low.
 * 
 * @param <T>
 *            type of list elements generated
 * @param content
 *            generator providing the content of lists generated
 * @param low
 *            minimal size
 * @param high
 *            max size
 */
public static <T extends Comparable<T>> Generator<List<T>> sortedLists(
    Generator<T> content, int low, int high) {
  return sortedLists(content, integers(low, high));
}
net.java.quickcheck.generatorCombinedGeneratorssortedLists

Javadoc

Create a generator of sorted lists with values from the content generator.

Popular methods of CombinedGenerators

  • lists
    Create a generator of lists with values from the content generator. Length values of lists generated
  • nullsAnd
    Create a generator as a combination of a null value generator and generator of type T.
  • uniqueValues
    Create a generator that ensures unique values. The actual values are created with an arbitrary ge
  • sets
    Create a generator of sets with values from the content generator.
  • arrays
    Create a generator of arrays with values from the content generator. Length values of arrays generat
  • byteArrays
    Create a generator of byte arrays. Length values of arrays generated will be created with size gener
  • ensureValues
    Create a deterministic generator which guarantees that all values from the ensuredValues array will
  • excludeValues
    Create a generator that omits a given set of values.
  • frequency
    Create a frequency generator. The frequency of Generator usage depends on the generator weight.

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • runOnUiThread (Activity)
  • onCreateOptionsMenu (Activity)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Option (scala)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now