@Immutable @LevelUpApi(contract=PUBLIC) public final class PercentageTip extends Tip<PercentageTip>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<PercentageTip> |
CREATOR
Implements the
Parcelable interface. |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
PercentageTip(int value) |
PercentageTip(Parcel parcel) |
Modifier and Type | Method and Description |
---|---|
int |
getEncodedValue()
Get the encoded tip value which may include an encoding offset.
|
String |
toString() |
PercentageTip |
withValue(int value)
Get a copy of the Tip with the specified tip value.
|
describeContents, equals, getValue, hashCode, writeToParcel
public static final Parcelable.Creator<PercentageTip> CREATOR
Parcelable
interface.public PercentageTip(int value)
value
- the value of the tippublic PercentageTip(Parcel parcel)
parcel
- the Parcel to construct frompublic int getEncodedValue()
Tip
getEncodedValue
in class Tip<PercentageTip>
public PercentageTip withValue(int value)
Tip
withValue
in class Tip<PercentageTip>
value
- the value of the tip