![JAR search and dependency download from the Maven repository](/logo.png)
com.insightfullogic.lambdabehave.impl.generators.Generators Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lambda-behave Show documentation
Show all versions of lambda-behave Show documentation
A modern testing and behavioural specification framework for Java 8
package com.insightfullogic.lambdabehave.impl.generators;
import com.insightfullogic.lambdabehave.generators.Generator;
import com.insightfullogic.lambdabehave.generators.SourceGenerator;
import static java.lang.Integer.MAX_VALUE;
public final class Generators {
public static final char ASCII_CHAR_START = ' ';
public static final char ASCII_CHAR_END = '~';
public static final int GAP = ASCII_CHAR_END - ASCII_CHAR_START;
private Generators() {}
public static long longs(final SourceGenerator ng) {
return ((long) ng.generateInt(MAX_VALUE)) << 32 + ng.generateInt(MAX_VALUE);
}
public static IllegalArgumentException exceededMaxTries() {
return new IllegalArgumentException("Unable to find matching value in " + Generator.MAX_TRIES + " attempts");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy