public abstract class NullableParcelConverter<T> extends Object implements ParcelConverter<T>
Convenience class to handle nullable objects.
ParcelConverter.EmptyConverterCONVERT_FROM_PARCEL, CONVERT_TO_PARCEL| Constructor and Description |
|---|
NullableParcelConverter() |
| Modifier and Type | Method and Description |
|---|---|
T |
fromParcel(android.os.Parcel parcel)
Generates an instance from the values provided in the given parcel.
|
abstract T |
nullSafeFromParcel(android.os.Parcel parcel) |
abstract void |
nullSafeToParcel(T input,
android.os.Parcel parcel) |
void |
toParcel(T input,
android.os.Parcel parcel)
Write the given input parameter to the destinationParcel.
|
public NullableParcelConverter()
public void toParcel(T input, android.os.Parcel parcel)
TypeRangeParcelConverterWrite the given input parameter to the destinationParcel.
toParcel in interface TypeRangeParcelConverter<T,T>input - U instanceparcel - Parcel to write topublic T fromParcel(android.os.Parcel parcel)
TypeRangeParcelConverterGenerates an instance from the values provided in the given parcel.
fromParcel in interface TypeRangeParcelConverter<T,T>parcel - Parcel to read frompublic abstract void nullSafeToParcel(T input, android.os.Parcel parcel)
public abstract T nullSafeFromParcel(android.os.Parcel parcel)
Copyright © 2018. All Rights Reserved.