com.github.fge.jsonpatch.operation
Class TranslateOptionalOperation

java.lang.Object
  extended by com.github.fge.jsonpatch.operation.PathDualValueOperation
      extended by com.github.fge.jsonpatch.operation.TranslateOperationBase
          extended by com.github.fge.jsonpatch.operation.TranslateOptionalOperation
All Implemented Interfaces:
JsonSerializable, JsonPatchOperation

public final class TranslateOptionalOperation
extends TranslateOperationBase

Extended JSON Patch translate? operation. The operation will translate a fromValue to a toValue at path if it exists. It will do nothing if the actual value at path is not equal to fromValue. It will do nothing if there is no value at path.


Field Summary
static String OPERATION_NAME
           
 
Fields inherited from class com.github.fge.jsonpatch.operation.PathDualValueOperation
BUNDLE, fromValue, op, path, toValue
 
Constructor Summary
TranslateOptionalOperation(JsonPointer path, JsonNode fromValue, JsonNode toValue)
           
 
Method Summary
 
Methods inherited from class com.github.fge.jsonpatch.operation.TranslateOperationBase
apply
 
Methods inherited from class com.github.fge.jsonpatch.operation.PathDualValueOperation
serialize, serializeWithType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OPERATION_NAME

public static final String OPERATION_NAME
See Also:
Constant Field Values
Constructor Detail

TranslateOptionalOperation

public TranslateOptionalOperation(JsonPointer path,
                                  JsonNode fromValue,
                                  JsonNode toValue)