/** * Returns {@code true} if there is a value at the referenced location in the specified {@code target}. * * @param target the target referenced by this {@code JsonPointer} * @return {@code true} if this pointer points to a value in a specified {@code target}. */ @Override public boolean containsValue(JsonStructure target) { NodeReference[] refs = getReferences(target); return refs[0].contains(); }
/** * Returns the value at the referenced location in the specified {@code target} * * @param target the target referenced by this {@code JsonPointer} * @return the referenced value in the target. * @throws NullPointerException if {@code target} is null * @throws JsonException if the referenced value does not exist */ @Override public JsonValue getValue(JsonStructure target) { NodeReference[] refs = getReferences(target); return refs[0].get(); }
/** * 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; }
/** * Returns {@code true} if there is a value at the referenced location in the specified {@code target}. * * @param target the target referenced by this {@code JsonPointer} * @return {@code true} if this pointer points to a value in a specified {@code target}. */ @Override public boolean containsValue(JsonStructure target) { NodeReference[] refs = getReferences(target); return refs[0].contains(); }
/** * Returns the value at the referenced location in the specified {@code target} * * @param target the target referenced by this {@code JsonPointer} * @return the referenced value in the target. * @throws NullPointerException if {@code target} is null * @throws JsonException if the referenced value does not exist */ @Override public JsonValue getValue(JsonStructure target) { NodeReference[] refs = getReferences(target); return refs[0].get(); }
/** * 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; }
/** * Returns {@code true} if there is a value at the referenced location in the specified {@code target}. * * @param target the target referenced by this {@code JsonPointer} * @return {@code true} if this pointer points to a value in a specified {@code target}. */ @Override public boolean containsValue(JsonStructure target) { NodeReference[] refs = getReferences(target); return refs[0].contains(); }
/** * Returns {@code true} if there is a value at the referenced location in the specified {@code target}. * * @param target the target referenced by this {@code JsonPointer} * @return {@code true} if this pointer points to a value in a specified {@code target}. */ @Override public boolean containsValue(JsonStructure target) { NodeReference[] refs = getReferences(target); return refs[0].contains(); }
/** * Returns {@code true} if there is a value at the referenced location in the specified {@code target}. * * @param target the target referenced by this {@code JsonPointer} * @return {@code true} if this pointer points to a value in a specified {@code target}. */ @Override public boolean containsValue(JsonStructure target) { NodeReference[] refs = getReferences(target); return refs[0].contains(); }
/** * Returns {@code true} if there is a value at the referenced location in the specified {@code target}. * * @param target the target referenced by this {@code JsonPointer} * @return {@code true} if this pointer points to a value in a specified {@code target}. */ @Override public boolean containsValue(JsonStructure target) { NodeReference[] refs = getReferences(target); return refs[0].contains(); }
/** * Returns the value at the referenced location in the specified {@code target} * * @param target the target referenced by this {@code JsonPointer} * @return the referenced value in the target. * @throws NullPointerException if {@code target} is null * @throws JsonException if the referenced value does not exist */ @Override public JsonValue getValue(JsonStructure target) { NodeReference[] refs = getReferences(target); return refs[0].get(); }
/** * Returns the value at the referenced location in the specified {@code target} * * @param target the target referenced by this {@code JsonPointer} * @return the referenced value in the target. * @throws NullPointerException if {@code target} is null * @throws JsonException if the referenced value does not exist */ @Override public JsonValue getValue(JsonStructure target) { NodeReference[] refs = getReferences(target); return refs[0].get(); }
/** * Returns the value at the referenced location in the specified {@code target} * * @param target the target referenced by this {@code JsonPointer} * @return the referenced value in the target. * @throws NullPointerException if {@code target} is null * @throws JsonException if the referenced value does not exist */ @Override public JsonValue getValue(JsonStructure target) { NodeReference[] refs = getReferences(target); return refs[0].get(); }
/** * Returns the value at the referenced location in the specified {@code target} * * @param target the target referenced by this {@code JsonPointer} * @return the referenced value in the target. * @throws NullPointerException if {@code target} is null * @throws JsonException if the referenced value does not exist */ @Override public JsonValue getValue(JsonStructure target) { NodeReference[] refs = getReferences(target); return refs[0].get(); }
/** * 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; }