@Override protected boolean isIncrementGreaterThanRangeSize() { return Math.abs(range.getBeginning() - range.getEnd()) <= Math.abs(increment); }
@Override protected boolean isIncrementGreaterThanRangeSize() { return Math.abs(range.getBeginning() - range.getEnd()) <= Math.abs(increment); }
@Override protected boolean isIncrementGreaterThanRangeSize() { return Math.abs(range.getBeginning() - range.getEnd()) <= Math.abs(increment); }
@Override protected boolean isIncrementGreaterThanRangeSize() { return Math.abs(range.getBeginning() - range.getEnd()) <= Math.abs(increment); }
@Override protected boolean isIncrementGreaterThanRangeSize() { return Math.abs(range.getBeginning() - range.getEnd()) <= Math.abs(increment); }
@Override protected boolean isIncrementGreaterThanRangeSize() { return Math.abs(range.getBeginning() - range.getEnd()) <= Math.abs(increment); }
@Override protected boolean isIncrementGreaterThanRangeSize() { return Math.abs(range.getBeginning() - range.getEnd()) <= Math.abs(increment); }
@Override protected boolean isIncrementGreaterThanRangeSize() { return Math.abs(range.getBeginning() - range.getEnd()) <= Math.abs(increment); }
@Override protected boolean isIncrementGreaterThanRangeSize() { return Math.abs(range.getBeginning() - range.getEnd()) <= Math.abs(increment); }
@Override protected boolean isIncrementGreaterThanRangeSize() { return Math.abs(range.getBeginning() - range.getEnd()) <= Math.abs(increment); }
@Override protected boolean isIncrementGreaterThanRangeSize() { return Math.abs(range.getBeginning() - range.getEnd()) <= Math.abs(increment); }
@Override protected boolean isIncrementGreaterThanRangeSize() { return Math.abs(range.getBeginning() - range.getEnd()) <= Math.abs(increment); }
/** * Constructs random content string value with specified <code>lengthValue</code> and specified * <code>charRanges</code>. * * @param lengthValue Value that returns integer which represents length of generated string. It should never * generate length that is less than 1. * @param charRanges Ranges of characters from which string will be constructed. */ public RandomContentStringValue(Value<Integer> lengthValue, List<Range<Character>> charRanges) { if (lengthValue == null) { throw new IllegalArgumentException("lengthValue cannot be null."); } this.lengthValue = lengthValue; Set<Character> chars = new HashSet<>(); for (Range<Character> range : charRanges) { if (!range.isIncreasing()) { throw new IllegalArgumentException("All ranges must be increasing."); } for (Character c = range.getBeginning(); c <= range.getEnd(); c++) { chars.add(c); } } possibleCharacters = new ArrayList<>(chars); distribution = new UniformDistribution(); }
/** * Constructs random content string value with specified <code>lengthValue</code> and specified * <code>charRanges</code>. * * @param lengthValue Value that returns integer which represents length of generated string. It should never * generate length that is less than 1. * @param charRanges Ranges of characters from which string will be constructed. */ public RandomContentStringValue(Value<Integer> lengthValue, List<Range<Character>> charRanges) { if (lengthValue == null) { throw new IllegalArgumentException("lengthValue cannot be null."); } this.lengthValue = lengthValue; Set<Character> chars = new HashSet<>(); for (Range<Character> range : charRanges) { if (!range.isIncreasing()) { throw new IllegalArgumentException("All ranges must be increasing."); } for (Character c = range.getBeginning(); c <= range.getEnd(); c++) { chars.add(c); } } possibleCharacters = new ArrayList<>(chars); distribution = new UniformDistribution(); }
/** * Constructs range value with specified <code>range</code>, <code>useEdgeCases</code> and * <code>distribution</code>. * * @param range Range. * @param useEdgeCases Indicates whether to create edge cases as first two values or not. * @param distribution Distribution to use for value selection. */ public RangeValue(Range<T> range, boolean useEdgeCases, Distribution distribution) { if (range == null) { throw new IllegalArgumentException("Range cannot be null."); } if (!range.isIncreasing()) { throw new InvalidRangeBoundsException("End of the range must be greater than the beginning of the range."); } if (distribution == null) { throw new IllegalArgumentException("Distribution cannot be null."); } this.beginning = range.getBeginning(); this.end = range.getEnd(); this.useEdgeCases = useEdgeCases; this.distribution = distribution; }
/** * Constructs range value with specified <code>range</code>, <code>useEdgeCases</code> and * <code>distribution</code>. * * @param range Range. * @param useEdgeCases Indicates whether to create edge cases as first two values or not. * @param distribution Distribution to use for value selection. */ public RangeValue(Range<T> range, boolean useEdgeCases, Distribution distribution) { if (range == null) { throw new IllegalArgumentException("Range cannot be null."); } if (!range.isIncreasing()) { throw new InvalidRangeBoundsException("End of the range must be greater than the beginning of the range."); } if (distribution == null) { throw new IllegalArgumentException("Distribution cannot be null."); } this.beginning = range.getBeginning(); this.end = range.getEnd(); this.useEdgeCases = useEdgeCases; this.distribution = distribution; }