blob: 70d9c75372714fa3787a2d9367becf4e45b3cc85 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (9.0.1) on Fri Dec 28 04:30:56 EST 2018 -->
<title>JsonPointerImpl (JSR 374 (JSON Processing) Default Provider 1.1.5 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="date" content="2018-12-28">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
<script type="text/javascript" src="../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../jquery/jquery-1.10.2.js"></script>
<script type="text/javascript" src="../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="JsonPointerImpl (JSR 374 (JSON Processing) Default Provider 1.1.5 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../";loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../org.glassfish.java.json-summary.html">Module</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/JsonPointerImpl.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/glassfish/json/JsonPatchImpl.html" title="class in org.glassfish.json"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../org/glassfish/json/JsonPrettyGeneratorImpl.html" title="class in org.glassfish.json"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/glassfish/json/JsonPointerImpl.html" target="_top">Frames</a></li>
<li><a href="JsonPointerImpl.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><span>SEARCH:&nbsp;</span>
<input type="text" id="search" value=" " disabled="disabled">
<input type="reset" id="reset" value=" " disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle"><span class="moduleLabelInType">Module</span>&nbsp;<a href="../../../org.glassfish.java.json-summary.html">org.glassfish.java.json</a></div>
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="../../../org/glassfish/json/package-summary.html">org.glassfish.json</a></div>
<h2 title="Class JsonPointerImpl" class="title">Class JsonPointerImpl</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.glassfish.json.JsonPointerImpl</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></code>, <code><a href="../../../javax/json/JsonPointer.html" title="interface in javax.json">JsonPointer</a></code></dd>
</dl>
<hr>
<br>
<pre>public final class <span class="typeNameLabel">JsonPointerImpl</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../../javax/json/JsonPointer.html" title="interface in javax.json">JsonPointer</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre>
<div class="block"><p>This class is an immutable representation of a JSON Pointer as specified in
<a href="http://tools.ietf.org/html/rfc6901">RFC 6901</a>.
</p>
<p> A JSON Pointer, when applied to a target <a href="../../../javax/json/JsonValue.html" title="interface in javax.json"><code>JsonValue</code></a>,
defines a reference location in the target.</p>
<p> An empty JSON Pointer string defines a reference to the target itself.</p>
<p> If the JSON Pointer string is non-empty, it must be a sequence
of '/' prefixed tokens, and the target must either be a <a href="../../../javax/json/JsonArray.html" title="interface in javax.json"><code>JsonArray</code></a>
or <a href="../../../javax/json/JsonObject.html" title="interface in javax.json"><code>JsonObject</code></a>. If the target is a <code>JsonArray</code>, the pointer
defines a reference to an array element, and the last token specifies the index.
If the target is a <a href="../../../javax/json/JsonObject.html" title="interface in javax.json"><code>JsonObject</code></a>, the pointer defines a reference to a
name/value pair, and the last token specifies the name.
</p>
<p> The method <a href="../../../org/glassfish/json/JsonPointerImpl.html#getValue-javax.json.JsonStructure-"><code>getValue()</code></a> returns the referenced value.
The methods <a href="../../../org/glassfish/json/JsonPointerImpl.html#add-javax.json.JsonStructure-javax.json.JsonValue-"><code>add()</code></a>, <a href="../../../org/glassfish/json/JsonPointerImpl.html#replace-javax.json.JsonStructure-javax.json.JsonValue-"><code>replace()</code></a>,
and <a href="../../../org/glassfish/json/JsonPointerImpl.html#remove-javax.json.JsonStructure-"><code>remove()</code></a> executes the operations specified in
<a href="http://tools.ietf.org/html/rfc6902">RFC 6902</a>. </p></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../serialized-form.html#org.glassfish.json.JsonPointerImpl">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="../../../org/glassfish/json/JsonPointerImpl.html#JsonPointerImpl-java.lang.String-">JsonPointerImpl</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;jsonPointer)</code></th>
<td class="colLast">
<div class="block">Constructs and initializes a JsonPointerImpl.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../../javax/json/JsonStructure.html" title="interface in javax.json">JsonStructure</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../org/glassfish/json/JsonPointerImpl.html#add-javax.json.JsonStructure-javax.json.JsonValue-">add</a></span>&#8203;(<a href="../../../javax/json/JsonStructure.html" title="interface in javax.json">JsonStructure</a>&nbsp;target,
<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Adds or replaces a value at the referenced location in the specified
<code>target</code> with the specified <code>value</code>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../org/glassfish/json/JsonPointerImpl.html#containsValue-javax.json.JsonStructure-">containsValue</a></span>&#8203;(<a href="../../../javax/json/JsonStructure.html" title="interface in javax.json">JsonStructure</a>&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if there is a value at the referenced location in the specified <code>target</code>.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../org/glassfish/json/JsonPointerImpl.html#equals-java.lang.Object-">equals</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;obj)</code></th>
<td class="colLast">
<div class="block">Compares this <code>JsonPointer</code> with another object.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../org/glassfish/json/JsonPointerImpl.html#getValue-javax.json.JsonStructure-">getValue</a></span>&#8203;(<a href="../../../javax/json/JsonStructure.html" title="interface in javax.json">JsonStructure</a>&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Returns the value at the referenced location in the specified <code>target</code></div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../org/glassfish/json/JsonPointerImpl.html#hashCode--">hashCode</a></span>&#8203;()</code></th>
<td class="colLast">
<div class="block">Returns the hash code value for this <code>JsonPointer</code> object.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../../../javax/json/JsonStructure.html" title="interface in javax.json">JsonStructure</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../org/glassfish/json/JsonPointerImpl.html#remove-javax.json.JsonStructure-">remove</a></span>&#8203;(<a href="../../../javax/json/JsonStructure.html" title="interface in javax.json">JsonStructure</a>&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Removes the value at the reference location in the specified <code>target</code></div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../../javax/json/JsonStructure.html" title="interface in javax.json">JsonStructure</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../org/glassfish/json/JsonPointerImpl.html#replace-javax.json.JsonStructure-javax.json.JsonValue-">replace</a></span>&#8203;(<a href="../../../javax/json/JsonStructure.html" title="interface in javax.json">JsonStructure</a>&nbsp;target,
<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Replaces the value at the referenced location in the specified
<code>target</code> with the specified <code>value</code>.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="JsonPointerImpl-java.lang.String-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>JsonPointerImpl</h4>
<pre>public&nbsp;JsonPointerImpl&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;jsonPointer)</pre>
<div class="block">Constructs and initializes a JsonPointerImpl.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>jsonPointer</code> - the JSON Pointer string</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if <code>jsonPointer</code> is <code>null</code></dd>
<dd><code><a href="../../../javax/json/JsonException.html" title="class in javax.json">JsonException</a></code> - if <code>jsonPointer</code> is not a valid JSON Pointer</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="equals-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public&nbsp;boolean&nbsp;equals&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;obj)</pre>
<div class="block">Compares this <code>JsonPointer</code> with another object.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>obj</code> - the object to compare this <code>JsonPointer</code> against</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the given object is a <code>JsonPointer</code> with the same
reference tokens as this one, false otherwise.</dd>
</dl>
</li>
</ul>
<a name="hashCode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public&nbsp;int&nbsp;hashCode&#8203;()</pre>
<div class="block">Returns the hash code value for this <code>JsonPointer</code> object.
The hash code of this object is defined by the hash codes of it's reference tokens.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the hash code value for this <code>JsonPointer</code> object</dd>
</dl>
</li>
</ul>
<a name="containsValue-javax.json.JsonStructure-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>containsValue</h4>
<pre>public&nbsp;boolean&nbsp;containsValue&#8203;(<a href="../../../javax/json/JsonStructure.html" title="interface in javax.json">JsonStructure</a>&nbsp;target)</pre>
<div class="block">Returns <code>true</code> if there is a value at the referenced location in the specified <code>target</code>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../javax/json/JsonPointer.html#containsValue-javax.json.JsonStructure-">containsValue</a></code>&nbsp;in interface&nbsp;<code><a href="../../../javax/json/JsonPointer.html" title="interface in javax.json">JsonPointer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>target</code> - the target referenced by this <code>JsonPointer</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if this pointer points to a value in a specified <code>target</code>.</dd>
</dl>
</li>
</ul>
<a name="getValue-javax.json.JsonStructure-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getValue</h4>
<pre>public&nbsp;<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>&nbsp;getValue&#8203;(<a href="../../../javax/json/JsonStructure.html" title="interface in javax.json">JsonStructure</a>&nbsp;target)</pre>
<div class="block">Returns the value at the referenced location in the specified <code>target</code></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../javax/json/JsonPointer.html#getValue-javax.json.JsonStructure-">getValue</a></code>&nbsp;in interface&nbsp;<code><a href="../../../javax/json/JsonPointer.html" title="interface in javax.json">JsonPointer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>target</code> - the target referenced by this <code>JsonPointer</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the referenced value in the target.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if <code>target</code> is null</dd>
<dd><code><a href="../../../javax/json/JsonException.html" title="class in javax.json">JsonException</a></code> - if the referenced value does not exist</dd>
</dl>
</li>
</ul>
<a name="add-javax.json.JsonStructure-javax.json.JsonValue-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre>public&nbsp;<a href="../../../javax/json/JsonStructure.html" title="interface in javax.json">JsonStructure</a>&nbsp;add&#8203;(<a href="../../../javax/json/JsonStructure.html" title="interface in javax.json">JsonStructure</a>&nbsp;target,
<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>&nbsp;value)</pre>
<div class="block">Adds or replaces a value at the referenced location in the specified
<code>target</code> with the specified <code>value</code>.
<ol>
<li>If the reference is the target (empty JSON Pointer string),
the specified <code>value</code>, which must be the same type as
specified <code>target</code>, is returned.</li>
<li>If the reference is an array element, the specified <code>value</code> is inserted
into the array, at the referenced index. The value currently at that location, and
any subsequent values, are shifted to the right (adds one to the indices).
Index starts with 0. If the reference is specified with a "-", or if the
index is equal to the size of the array, the value is appended to the array.</li>
<li>If the reference is a name/value pair of a <code>JsonObject</code>, and the
referenced value exists, the value is replaced by the specified <code>value</code>.
If the value does not exist, a new name/value pair is added to the object.</li>
</ol></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../javax/json/JsonPointer.html#add-T-javax.json.JsonValue-">add</a></code>&nbsp;in interface&nbsp;<code><a href="../../../javax/json/JsonPointer.html" title="interface in javax.json">JsonPointer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>target</code> - the target referenced by this <code>JsonPointer</code></dd>
<dd><code>value</code> - the value to be added</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the transformed <code>target</code> after the value is added.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if <code>target</code> is <code>null</code></dd>
<dd><code><a href="../../../javax/json/JsonException.html" title="class in javax.json">JsonException</a></code> - if the reference is an array element and
the index is out of range (<code>index &lt; 0 || index &gt; array size</code>),
or if the pointer contains references to non-existing objects or arrays.</dd>
</dl>
</li>
</ul>
<a name="replace-javax.json.JsonStructure-javax.json.JsonValue-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>replace</h4>
<pre>public&nbsp;<a href="../../../javax/json/JsonStructure.html" title="interface in javax.json">JsonStructure</a>&nbsp;replace&#8203;(<a href="../../../javax/json/JsonStructure.html" title="interface in javax.json">JsonStructure</a>&nbsp;target,
<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>&nbsp;value)</pre>
<div class="block">Replaces the value at the referenced location in the specified
<code>target</code> with the specified <code>value</code>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../javax/json/JsonPointer.html#replace-T-javax.json.JsonValue-">replace</a></code>&nbsp;in interface&nbsp;<code><a href="../../../javax/json/JsonPointer.html" title="interface in javax.json">JsonPointer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>target</code> - the target referenced by this <code>JsonPointer</code></dd>
<dd><code>value</code> - the value to be stored at the referenced location</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the transformed <code>target</code> after the value is replaced.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if <code>target</code> is <code>null</code></dd>
<dd><code><a href="../../../javax/json/JsonException.html" title="class in javax.json">JsonException</a></code> - if the referenced value does not exist,
or if the reference is the target.</dd>
</dl>
</li>
</ul>
<a name="remove-javax.json.JsonStructure-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>remove</h4>
<pre>public&nbsp;<a href="../../../javax/json/JsonStructure.html" title="interface in javax.json">JsonStructure</a>&nbsp;remove&#8203;(<a href="../../../javax/json/JsonStructure.html" title="interface in javax.json">JsonStructure</a>&nbsp;target)</pre>
<div class="block">Removes the value at the reference location in the specified <code>target</code></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../javax/json/JsonPointer.html#remove-T-">remove</a></code>&nbsp;in interface&nbsp;<code><a href="../../../javax/json/JsonPointer.html" title="interface in javax.json">JsonPointer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>target</code> - the target referenced by this <code>JsonPointer</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the transformed <code>target</code> after the value is removed.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if <code>target</code> is <code>null</code></dd>
<dd><code><a href="../../../javax/json/JsonException.html" title="class in javax.json">JsonException</a></code> - if the referenced value does not exist,
or if the reference is the target.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../org.glassfish.java.json-summary.html">Module</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/JsonPointerImpl.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/glassfish/json/JsonPatchImpl.html" title="class in org.glassfish.json"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../org/glassfish/json/JsonPrettyGeneratorImpl.html" title="class in org.glassfish.json"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/glassfish/json/JsonPointerImpl.html" target="_top">Frames</a></li>
<li><a href="JsonPointerImpl.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2012-2018, <a href="http://www.oracle.com">Oracle</a> and/or its affiliates. All Rights Reserved. Use is subject to <a href="../../../doc-files/speclicense.html" target="_top">license terms</a>. <br>Comments to : jsonp-dev@eclipse.org</small></p>
</body>
</html>