T
- the restorable object's typepublic interface Restorable<T extends Restorable<T>>
A typical capture usage:
X restorableObj; // X instanceof Restorable<X>
RestorableState<X> state = restorableObj.capture();
.. persist state
A typical restore usage:
RestorableState<X> state = ... // read from persistence
X restorableObj = state.restore();
...
Modifier and Type | Method and Description |
---|---|
RestorableState<T> |
capture()
Captures the state of this object.
|
RestorableState<T> capture()
RestorableState
instance that contains the state for this object and can
restore it afterwards.Copyright © 2019 Google LLC. All rights reserved.