@Test public void getDerivedFieldsMethodMapSupportedExpression() { List<DerivedField> derivedFields = supportedExpressionSupplier.stream().map(derivedFieldCreator).collect(Collectors.toList()); AtomicInteger arityCounter = new AtomicInteger(); Map<String, MethodDeclaration> retrieved = DerivedFieldFunctionUtils.getDerivedFieldsMethodMap(derivedFields, arityCounter); assertEquals(derivedFields.size(), retrieved.size()); }
static Map<String, MethodDeclaration> getDerivedFieldsMethodMap(final List<DerivedField> derivedFields, final AtomicInteger arityCounter) { Map<String, MethodDeclaration> toReturn = new HashMap<>(); derivedFields.forEach(derivedField -> toReturn.put(derivedField.getName().getValue(), getDerivedFieldMethodDeclaration(derivedField, arityCounter))); return toReturn; }
DerivedFieldFunctionUtils { static Map<String, MethodDeclaration> getDerivedFieldsMethodMap(final List<DerivedField> derivedFields, final AtomicInteger arityCounter) { Map<String, MethodDeclaration> toReturn = new HashMap<>(); derivedFields.forEach(derivedField -> toReturn.put(derivedField.getName().getValue(), getDerivedFieldMethodDeclaration(derivedField, arityCounter))); return toReturn; } }
DerivedFieldFunctionUtils { static Map<String, MethodDeclaration> getDerivedFieldsMethodMap(final List<DerivedField> derivedFields, final AtomicInteger arityCounter) { Map<String, MethodDeclaration> toReturn = new HashMap<>(); derivedFields.forEach(derivedField -> toReturn.put(derivedField.getName().getValue(), getDerivedFieldMethodDeclaration(derivedField, arityCounter))); return toReturn; } private  DerivedFieldFunctionUtils(); }
DerivedFieldFunctionUtils { static Map<String, MethodDeclaration> getDerivedFieldsMethodMap(final List<DerivedField> derivedFields, final AtomicInteger arityCounter) { Map<String, MethodDeclaration> toReturn = new HashMap<>(); derivedFields.forEach(derivedField -> toReturn.put(derivedField.getName().getValue(), getDerivedFieldMethodDeclaration(derivedField, arityCounter))); return toReturn; } private  DerivedFieldFunctionUtils();  }
DerivedFieldFunctionUtils { static Map<String, MethodDeclaration> getDerivedFieldsMethodMap(final List<DerivedField> derivedFields, final AtomicInteger arityCounter) { Map<String, MethodDeclaration> toReturn = new HashMap<>(); derivedFields.forEach(derivedField -> toReturn.put(derivedField.getName().getValue(), getDerivedFieldMethodDeclaration(derivedField, arityCounter))); return toReturn; } private  DerivedFieldFunctionUtils();   }