|
Sync Android SDK
0.9.0
|
Mutator is a functional object that you provide to modify entity data in a controlled manner. More...
Public Member Functions | |
| Mutator () | |
| Sole constructor. More... | |
| JSONObject | onApplied (JSONObject currentData) |
| Override this method to provide your own implementation of data mutator. More... | |
Mutator is a functional object that you provide to modify entity data in a controlled manner.
Override
to perform your modifications. This method will be provided with the previous data contents and should return new desired contents or null to abort mutate operation.
You must dispose() a mutator to avoid memory leaks. Internally, the native part will keep a strong reference to the Java class, keeping it from being GC'd.
| com.twilio.sync.Mutator.Mutator | ( | ) |
Sole constructor.
(For invocation by subclass constructors, typically implicit.)
| JSONObject com.twilio.sync.Mutator.onApplied | ( | JSONObject | currentData | ) |
Override this method to provide your own implementation of data mutator.
Default implementation returns null which causes the mutation to abort.
| currentData | Current contents of the entity to modify. |