TollCard

@CarProtocol
@RequiresCarApi(value = 3)
public final class TollCard


Information about toll card capabilities in a car.

Summary

Nested types

public final class TollCard.Builder

A builder of TollCard.

Constants

static final int

Toll card state invalid.

static final int

Toll card state is not inserted.

static final int

Toll card state is unknown.

static final int

Toll card state is valid.

Public methods

boolean
@NonNull CarValue<Integer>

Returns the toll card state if available.

int
@NonNull String

Constants

TOLLCARD_STATE_INVALID

Added in 1.1.0
public static final int TOLLCARD_STATE_INVALID = 2

Toll card state invalid.

On some vehicles this may be that the toll card is inserted but not valid while other vehicles might not have a toll card inserted.

TOLLCARD_STATE_NOT_INSERTED

Added in 1.1.0
public static final int TOLLCARD_STATE_NOT_INSERTED = 3

Toll card state is not inserted.

Will be returned if the car hardware is able to detect that the card is not inserted.

TOLLCARD_STATE_UNKNOWN

Added in 1.1.0
public static final int TOLLCARD_STATE_UNKNOWN = 0

Toll card state is unknown.

TOLLCARD_STATE_VALID

Added in 1.1.0
public static final int TOLLCARD_STATE_VALID = 1

Toll card state is valid.

Public methods

equals

Added in 1.4.0-rc02
public boolean equals(@Nullable Object other)

getCardState

Added in 1.1.0
public @NonNull CarValue<IntegergetCardState()

Returns the toll card state if available.

hashCode

Added in 1.4.0-rc02
public int hashCode()

toString

Added in 1.4.0-rc02
public @NonNull String toString()