test_class.declarator: testInstance
test_class.modifier: private static
test_class.original_string: private static InMapIndexRelation testInstance;
test_class.type: InMapIndexRelation
test_class.var_name: testInstance
test_class.file: core/src/test/java/com/scottlogic/datahelix/generator/core/fieldspecs/relations/InMapIndexRelationTest.java
test_class.identifier: InMapIndexRelationTest
test_case.body: @Test
      void reduceToRelatedFieldSpec_whenAllValid_returnCompleteWhiteList() {
          FieldSpec parameter = FieldSpecFactory.fromType(FieldType.STRING);
  
          FieldSpec expected = FieldSpecFactory.fromList(DistributedList.uniform(Arrays.asList(0, 1))).withNotNull();
          FieldSpec actual = testInstance.createModifierFromOtherFieldSpec(parameter);
  
          assertThat(actual, sameBeanAs(expected));
      }
test_case.class_method_signature: InMapIndexRelationTest.reduceToRelatedFieldSpec_whenAllValid_returnCompleteWhiteList()
test_case.full_signature: @Test void reduceToRelatedFieldSpec_whenAllValid_returnCompleteWhiteList()
test_case.identifier: reduceToRelatedFieldSpec_whenAllValid_returnCompleteWhiteList
test_case.invocations: fromType withNotNull fromList uniform asList createModifierFromOtherFieldSpec assertThat sameBeanAs
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void reduceToRelatedFieldSpec_whenAllValid_returnCompleteWhiteList()
focal_class.declarator: main
focal_class.modifier: private final
focal_class.original_string: private final Field main;
focal_class.type: Field
focal_class.var_name: main
focal_class.declarator: other
focal_class.modifier: private final
focal_class.original_string: private final Field other;
focal_class.type: Field
focal_class.var_name: other
focal_class.declarator: underlyingList
focal_class.modifier: private final
focal_class.original_string: private final DistributedList<Object> underlyingList;
focal_class.type: DistributedList<Object>
focal_class.var_name: underlyingList
focal_class.file: core/src/main/java/com/scottlogic/datahelix/generator/core/fieldspecs/relations/InMapIndexRelation.java
focal_class.identifier: InMapIndexRelation
focal_class.interfaces: implements FieldSpecRelation
focal_class.class_method_signature: InMapIndexRelation.InMapIndexRelation(Field main, Field other, DistributedList<Object> underlyingList)
focal_class.full_signature: public  InMapIndexRelation(Field main, Field other, DistributedList<Object> underlyingList)
focal_class.identifier: InMapIndexRelation
focal_class.modifiers: public
focal_class.parameters: (Field main, Field other, DistributedList<Object> underlyingList)
focal_class.signature:  InMapIndexRelation(Field main, Field other, DistributedList<Object> underlyingList)
focal_class.class_method_signature: InMapIndexRelation.createModifierFromOtherFieldSpec(FieldSpec otherFieldSpec)
focal_class.full_signature: @Override public FieldSpec createModifierFromOtherFieldSpec(FieldSpec otherFieldSpec)
focal_class.identifier: createModifierFromOtherFieldSpec
focal_class.modifiers: @Override public
focal_class.parameters: (FieldSpec otherFieldSpec)
focal_class.return: FieldSpec
focal_class.signature: FieldSpec createModifierFromOtherFieldSpec(FieldSpec otherFieldSpec)
focal_class.class_method_signature: InMapIndexRelation.createModifierFromOtherValue(DataBagValue otherFieldGeneratedValue)
focal_class.full_signature: @Override public FieldSpec createModifierFromOtherValue(DataBagValue otherFieldGeneratedValue)
focal_class.identifier: createModifierFromOtherValue
focal_class.modifiers: @Override public
focal_class.parameters: (DataBagValue otherFieldGeneratedValue)
focal_class.return: FieldSpec
focal_class.signature: FieldSpec createModifierFromOtherValue(DataBagValue otherFieldGeneratedValue)
focal_class.class_method_signature: InMapIndexRelation.inverse()
focal_class.full_signature: @Override public FieldSpecRelation inverse()
focal_class.identifier: inverse
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: FieldSpecRelation
focal_class.signature: FieldSpecRelation inverse()
focal_class.class_method_signature: InMapIndexRelation.main()
focal_class.full_signature: @Override public Field main()
focal_class.identifier: main
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Field
focal_class.signature: Field main()
focal_class.class_method_signature: InMapIndexRelation.other()
focal_class.full_signature: @Override public Field other()
focal_class.identifier: other
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Field
focal_class.signature: Field other()
focal_class.class_method_signature: InMapIndexRelation.getUnderlyingList()
focal_class.full_signature: public DistributedList<Object> getUnderlyingList()
focal_class.identifier: getUnderlyingList
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: DistributedList<Object>
focal_class.signature: DistributedList<Object> getUnderlyingList()
focal_class.class_method_signature: InMapIndexRelation.negate()
focal_class.full_signature: @Override public Constraint negate()
focal_class.identifier: negate
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Constraint
focal_class.signature: Constraint negate()
focal_method.body: @Override
      public FieldSpec createModifierFromOtherFieldSpec(FieldSpec otherFieldSpec) {
          List<Object> whiteList = new ArrayList<>();
  
          for (int i = 0; i < underlyingList.list().size(); i++) {
              Object testingElement = underlyingList.list().get(i);
              if (otherFieldSpec.canCombineWithWhitelistValue(testingElement)) {
                  whiteList.add(BigDecimal.valueOf(i));
              }
          }
          return FieldSpecFactory.fromList(DistributedList.uniform(whiteList)).withNotNull();
      }
focal_method.class_method_signature: InMapIndexRelation.createModifierFromOtherFieldSpec(FieldSpec otherFieldSpec)
focal_method.full_signature: @Override public FieldSpec createModifierFromOtherFieldSpec(FieldSpec otherFieldSpec)
focal_method.identifier: createModifierFromOtherFieldSpec
focal_method.invocations: size list get list canCombineWithWhitelistValue add valueOf withNotNull fromList uniform
focal_method.modifiers: @Override public
focal_method.parameters: (FieldSpec otherFieldSpec)
focal_method.return: FieldSpec
focal_method.signature: FieldSpec createModifierFromOtherFieldSpec(FieldSpec otherFieldSpec)