All Downloads are FREE. Search and download functionalities are using the official Maven repository.

icepick.StateHelper Maven / Gradle / Ivy

package icepick;

public interface StateHelper {

  T saveInstanceState(Object target, T state);

  T restoreInstanceState(Object target, T state);

  public static StateHelper NO_OP = new StateHelper() {
    @Override public Object saveInstanceState(Object target, Object state) {
      return state;
    }

    @Override public Object restoreInstanceState(Object target, Object state) {
      return state;
    }
  };
}