in src/main/java/com/epam/eco/commons/avro/avpath/AvPath.java [194:213]
private int operateUpdate(List<EvaluationResult> output, Function<Object, Object> update) {
int updateCount = 0;
for (EvaluationResult evalResult : output) {
boolean updated;
if (evalResult instanceof GetRecordFieldResult) {
updated = operateUpdateForRecordField((GetRecordFieldResult)evalResult, update);
} else if (evalResult instanceof SelectArrayElementResult) {
updated = operateUpdateForArrayElement((SelectArrayElementResult)evalResult, update);
} else if (evalResult instanceof SelectMapValueResult) {
updated = operateUpdateForMapValue((SelectMapValueResult)evalResult, update);
} else {
throw new RuntimeException(
String.format(
"Can't operate update for container object = %s",
evalResult.getContainer()));
}
updateCount = updated ? updateCount + 1 : updateCount;
}
return updateCount;
}