Interface IBackup<T>

  • Type Parameters:
    T - the template class

    public interface IBackup<T>
    This interface is used for backing up and restoring an object. The object is serialized to a JSON string and can be saved somewhere. Otherwise, a JSON object can be established to the corresponding one.
    Author:
    kong
    • Method Detail

      • backup

        boolean backup()
        Convert an object data to a JSON data
        Returns:
        true if it's success, false otherwise
      • restore

        T restore()
        Convert a JSON data to an object data
        Returns:
        an object or null in failed cases