FuelPrice

public abstract class FuelPrice implements Parcelable


Fuel price information for a given fuel type.

Summary

Nested types

public abstract class FuelPrice.Builder

Builder for FuelPrice.

public enum FuelPrice.FuelType implements Parcelable

Types of fuel.

Public constructors

Public methods

abstract Money

The price of the fuel.

abstract FuelPrice.FuelType

The type of fuel.

abstract Instant

The time the fuel price was last updated.

static FuelPrice
newInstance(FuelPrice.FuelType type, Money price, Instant updateTime)

Creates a FuelPrice with fuel type, price and last updated time.

Inherited Constants

From android.os.Parcelable
static final int
static final int
static final int
static final int

Inherited methods

From android.os.Parcelable
abstract int
int
abstract void
writeToParcel(Parcel p, int p1)

Public constructors

FuelPrice

public FuelPrice()

Public methods

getPrice

public abstract Money getPrice()

The price of the fuel.

getType

public abstract FuelPrice.FuelType getType()

The type of fuel.

getUpdateTime

public abstract Instant getUpdateTime()

The time the fuel price was last updated.

newInstance

public static FuelPrice newInstance(FuelPrice.FuelType type, Money price, Instant updateTime)

Creates a FuelPrice with fuel type, price and last updated time.

Parameters
FuelPrice.FuelType type

The type of fuel

Money price

The price of the fuel

Instant updateTime

The time the fuel price was last updated