test_class.file: core/src/test/java/com/scottlogic/datahelix/generator/core/generation/fieldvaluesources/LinearFieldValueSourceTest.java
test_class.identifier: LinearFieldValueSourceTest
test_case.body: @Test
      public void testGenerateRandomValues() {
          LinearRestrictions<BigDecimal> restrictions = new LinearRestrictions<>(
              BigDecimal.ZERO,
              BigDecimal.valueOf(4),
              new NumericGranularity(0));
          LinearFieldValueSource<BigDecimal> source = new LinearFieldValueSource<>(restrictions, Collections.emptySet());
  
          Stream<BigDecimal> results = source.generateRandomValues(new JavaUtilRandomNumberGenerator());
  
          assertTrue(results.limit(100).allMatch(x -> x.intValue() >= 0 & x.intValue() < 5));
      }
test_case.class_method_signature: LinearFieldValueSourceTest.testGenerateRandomValues()
test_case.full_signature: @Test public void testGenerateRandomValues()
test_case.identifier: testGenerateRandomValues
test_case.invocations: valueOf emptySet generateRandomValues assertTrue allMatch limit intValue intValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGenerateRandomValues()
focal_class.declarator: restrictions
focal_class.modifier: private final
focal_class.original_string: private final LinearRestrictions<T> restrictions;
focal_class.type: LinearRestrictions<T>
focal_class.var_name: restrictions
focal_class.declarator: blacklist
focal_class.modifier: private final
focal_class.original_string: private final Set<T> blacklist;
focal_class.type: Set<T>
focal_class.var_name: blacklist
focal_class.file: core/src/main/java/com/scottlogic/datahelix/generator/core/generation/fieldvaluesources/LinearFieldValueSource.java
focal_class.identifier: LinearFieldValueSource
focal_class.interfaces: implements FieldValueSource
focal_class.class_method_signature: LinearFieldValueSource.LinearFieldValueSource(LinearRestrictions<T> restrictions, Set<T> blacklist)
focal_class.full_signature: public  LinearFieldValueSource(LinearRestrictions<T> restrictions, Set<T> blacklist)
focal_class.identifier: LinearFieldValueSource
focal_class.modifiers: public
focal_class.parameters: (LinearRestrictions<T> restrictions, Set<T> blacklist)
focal_class.signature:  LinearFieldValueSource(LinearRestrictions<T> restrictions, Set<T> blacklist)
focal_class.class_method_signature: LinearFieldValueSource.generateAllValues()
focal_class.full_signature: @Override public Stream<T> generateAllValues()
focal_class.identifier: generateAllValues
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Stream<T>
focal_class.signature: Stream<T> generateAllValues()
focal_class.class_method_signature: LinearFieldValueSource.generateRandomValues(RandomNumberGenerator randomNumberGenerator)
focal_class.full_signature: @Override public Stream<T> generateRandomValues(RandomNumberGenerator randomNumberGenerator)
focal_class.identifier: generateRandomValues
focal_class.modifiers: @Override public
focal_class.parameters: (RandomNumberGenerator randomNumberGenerator)
focal_class.return: Stream<T>
focal_class.signature: Stream<T> generateRandomValues(RandomNumberGenerator randomNumberGenerator)
focal_class.class_method_signature: LinearFieldValueSource.notInBlacklist(T t)
focal_class.full_signature: private boolean notInBlacklist(T t)
focal_class.identifier: notInBlacklist
focal_class.modifiers: private
focal_class.parameters: (T t)
focal_class.return: boolean
focal_class.signature: boolean notInBlacklist(T t)
focal_class.class_method_signature: LinearFieldValueSource.equals(Object obj)
focal_class.full_signature: @Override public boolean equals(Object obj)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object obj)
focal_class.return: boolean
focal_class.signature: boolean equals(Object obj)
focal_class.class_method_signature: LinearFieldValueSource.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_method.body: @Override
      public Stream<T> generateRandomValues(RandomNumberGenerator randomNumberGenerator) {
          return Stream.generate(() -> restrictions.getGranularity()
                  .getRandom(
                      restrictions.getMin(),
                      restrictions.getGranularity().getNext(restrictions.getMax()),
                      randomNumberGenerator))
              .filter(this::notInBlacklist);
      }
focal_method.class_method_signature: LinearFieldValueSource.generateRandomValues(RandomNumberGenerator randomNumberGenerator)
focal_method.full_signature: @Override public Stream<T> generateRandomValues(RandomNumberGenerator randomNumberGenerator)
focal_method.identifier: generateRandomValues
focal_method.invocations: filter generate getRandom getGranularity getMin getNext getGranularity getMax
focal_method.modifiers: @Override public
focal_method.parameters: (RandomNumberGenerator randomNumberGenerator)
focal_method.return: Stream<T>
focal_method.signature: Stream<T> generateRandomValues(RandomNumberGenerator randomNumberGenerator)