Package jsonvalues
Class Patch.Builder
- java.lang.Object
-
- jsonvalues.Patch.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Patch.Builderadd(String path, JsElem value)ADD operation.Patch.Buildercopy(String from, String to)COPY operation.Patch.Buildermove(String from, String to)MOVE operation.Patch.Builderremove(String path)REMOVE operation.Patch.Builderreplace(String path, JsElem value)REPLACE operation.Patch.Buildertest(String path, JsElem value)TEST operation.JsArraytoArray()returns the array of operationsStringtoString()returns the array of operations as a string
-
-
-
Method Detail
-
add
public Patch.Builder add(String path, JsElem value)
ADD operation.- Parameters:
path- target location of the operationvalue- element to be added- Returns:
- this builder with an ADD operation appended
-
replace
public Patch.Builder replace(String path, JsElem value)
REPLACE operation.- Parameters:
path- target location of the operationvalue- element to be replaced with- Returns:
- this builder with a REPLACE operation appended
-
remove
public Patch.Builder remove(String path)
REMOVE operation.- Parameters:
path- target location of the operation- Returns:
- this builder with a REMOVE operation appended
-
test
public Patch.Builder test(String path, JsElem value)
TEST operation.- Parameters:
path- target location of the operationvalue- element to be tested- Returns:
- this builder with a TEST operation appended
-
move
public Patch.Builder move(String from, String to)
MOVE operation.- Parameters:
from- target location of the operationto- source location of the operation- Returns:
- this builder with a MOVE operation appended
-
copy
public Patch.Builder copy(String from, String to)
COPY operation.- Parameters:
from- target location of the operationto- source location of the operation- Returns:
- this builder with a COPY operation appended
-
toArray
public JsArray toArray()
returns the array of operations- Returns:
- a JsArray
-
-