/** * Executes the operation * @param op a {code BiFunction} used to specify the operation to execute on * the leaf node of the Json Pointer * @param target the target JsonStructure for this JsonPointer * @param value the JsonValue for add and replace, can be null for getvalue and remove */ private JsonStructure execute(BiFunction<NodeReference, JsonValue, JsonStructure> op, JsonStructure target, JsonValue value) { NodeReference[] refs = getReferences(target); JsonStructure result = op.apply(refs[0], value); for (int i = 1; i < refs.length; i++) { result = refs[i].replace(result); } return result; }
/** * Executes the operation * @param op a {code BiFunction} used to specify the operation to execute on * the leaf node of the Json Pointer * @param target the target JsonStructure for this JsonPointer * @param value the JsonValue for add and replace, can be null for getvalue and remove */ private JsonStructure execute(BiFunction<NodeReference, JsonValue, JsonStructure> op, JsonStructure target, JsonValue value) { NodeReference[] refs = getReferences(target); JsonStructure result = op.apply(refs[0], value); for (int i = 1; i < refs.length; i++) { result = refs[i].replace(result); } return result; }
/** * Executes the operation * @param op a {code BiFunction} used to specify the operation to execute on * the leaf node of the Json Pointer * @param target the target JsonStructure for this JsonPointer * @param value the JsonValue for add and replace, can be null for getvalue and remove */ private JsonStructure execute(BiFunction<NodeReference, JsonValue, JsonStructure> op, JsonStructure target, JsonValue value) { NodeReference[] refs = getReferences(target); JsonStructure result = op.apply(refs[0], value); for (int i = 1; i < refs.length; i++) { result = refs[i].replace(result); } return result; }
/** * Executes the operation * @param op a {code BiFunction} used to specify the operation to execute on * the leaf node of the Json Pointer * @param target the target JsonStructure for this JsonPointer * @param value the JsonValue for add and replace, can be null for getvalue and remove */ private JsonStructure execute(BiFunction<NodeReference, JsonValue, JsonStructure> op, JsonStructure target, JsonValue value) { NodeReference[] refs = getReferences(target); JsonStructure result = op.apply(refs[0], value); for (int i = 1; i < refs.length; i++) { result = refs[i].replace(result); } return result; }
/** * Executes the operation * @param op a {code BiFunction} used to specify the operation to execute on * the leaf node of the Json Pointer * @param target the target JsonStructure for this JsonPointer * @param value the JsonValue for add and replace, can be null for getvalue and remove */ private JsonStructure execute(BiFunction<NodeReference, JsonValue, JsonStructure> op, JsonStructure target, JsonValue value) { NodeReference[] refs = getReferences(target); JsonStructure result = op.apply(refs[0], value); for (int i = 1; i < refs.length; i++) { result = refs[i].replace(result); } return result; }
/** * Executes the operation * @param op a {code BiFunction} used to specify the operation to execute on * the leaf node of the Json Pointer * @param target the target JsonStructure for this JsonPointer * @param value the JsonValue for add and replace, can be null for getvalue and remove */ private JsonStructure execute(BiFunction<NodeReference, JsonValue, JsonStructure> op, JsonStructure target, JsonValue value) { NodeReference[] refs = getReferences(target); JsonStructure result = op.apply(refs[0], value); for (int i = 1; i < refs.length; i++) { result = refs[i].replace(result); } return result; }