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, widen
addComponentGenerators, canGenerateForParametersOfTypes, canRegisterAsType, canShrink, compatibleWithTypeParameter, configurationAnnotationsOn, configure, configure, gen, hasComponents, narrow, numberOfNeededComponents, provide, shrink, types
public 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 2010-2016 Paul R. Holser, Jr. All rights reserved. Licensed under The MIT License. pholser@alumni.rice.edu