@Test public void testInstantiationWithSuperState() { final TestState superState = new TestState(AdapterSavedState.EMPTY_STATE); final AdapterSavedState savedState = new AdapterSavedState(superState) {}; assertThat(savedState.getSuperState(), Matchers.<Parcelable>is(superState)); }
@NonNull final public Parcelable getSuperState() { return superState == null ? EMPTY_STATE : superState; }
AdapterSavedState implements Parcelable { @NonNull final public Parcelable getSuperState() { return superState == null ? EMPTY_STATE : superState; } }
AdapterSavedState implements Parcelable { @NonNull final public Parcelable getSuperState() { return superState == null ? EMPTY_STATE : superState; } @SuppressWarnings("WeakerAccess")  AdapterSavedState(); protected  AdapterSavedState(@NonNull final Parcelable superState); protected  AdapterSavedState(@NonNull final Parcel source); }
AdapterSavedState implements Parcelable { @NonNull final public Parcelable getSuperState() { return superState == null ? EMPTY_STATE : superState; } @SuppressWarnings("WeakerAccess")  AdapterSavedState(); protected  AdapterSavedState(@NonNull final Parcelable superState); protected  AdapterSavedState(@NonNull final Parcel source); @Override void writeToParcel(@NonNull final Parcel dest, final int flags); @NonNull final Parcelable getSuperState(); @Override int describeContents(); }
AdapterSavedState implements Parcelable { @NonNull final public Parcelable getSuperState() { return superState == null ? EMPTY_STATE : superState; } @SuppressWarnings("WeakerAccess")  AdapterSavedState(); protected  AdapterSavedState(@NonNull final Parcelable superState); protected  AdapterSavedState(@NonNull final Parcel source); @Override void writeToParcel(@NonNull final Parcel dest, final int flags); @NonNull final Parcelable getSuperState(); @Override int describeContents(); static final AdapterSavedState EMPTY_STATE; static final Creator<AdapterSavedState> CREATOR; }