public class LongGenerator extends IntegralGenerator<Long>
long or Long.| Constructor and Description |
|---|
LongGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(InRange range)
Tells this generator to produce values within a specified minimum and/or
maximum, inclusive, with uniform distribution.
|
Long |
generate(SourceOfRandomness random,
GenerationStatus status) |
protected Predicate<Long> |
inRange() |
protected Long |
leastMagnitude() |
protected Function<BigInteger,Long> |
narrow() |
protected Long |
negate(Long target) |
protected boolean |
negative(Long target) |
doShrink, widenaddComponentGenerators, canGenerateForParametersOfTypes, canRegisterAsType, canShrink, compatibleWithTypeParameter, configurationAnnotationsOn, configure, configure, hasComponents, narrow, numberOfNeededComponents, provideRepository, shrink, typespublic void configure(InRange range)
InRange.min() and InRange.max() take precedence over
InRange.minLong() and InRange.maxLong(), if non-empty.range - annotation that gives the range's constraintspublic Long generate(SourceOfRandomness random, GenerationStatus status)
protected Function<BigInteger,Long> narrow()
narrow in class IntegralGenerator<Long>protected Predicate<Long> inRange()
inRange in class IntegralGenerator<Long>protected Long leastMagnitude()
leastMagnitude in class IntegralGenerator<Long>protected boolean negative(Long target)
negative in class IntegralGenerator<Long>protected Long negate(Long target)
negate in class IntegralGenerator<Long>Copyright © 2016. All rights reserved.