public void fill(MapArray<String, String> objStrings) { LinqUtils.foreach( ReflectionUtils.getFields(this, ISetValue.class), element -> { String fieldValue = objStrings.first( (name, value) -> GetElement.namesEqual(name, AnnotationsUtil.getElementName(element))); if (fieldValue != null) { ISetValue setValueElement = (ISetValue) ReflectionUtils.getFieldValue(element, this); doActionRule.invoke(fieldValue, val -> setValueAction(val, setValueElement)); } }); }
public void verify(MapArray<String, String> objStrings, JActionTT<String, String> compare) { LinqUtils.foreach( ReflectionUtils.getFields(this, IHasValue.class), element -> { String fieldValue = objStrings.first( (name, value) -> GetElement.namesEqual(name, AnnotationsUtil.getElementName(element))); if (fieldValue != null) { IHasValue getValueElement = (IHasValue) ReflectionUtils.getFieldValue(element, this); doActionRule.invoke( fieldValue, val -> compare.invoke(getValueAction(getValueElement).trim(), val)); } }); }