TimeAndDistance

public class TimeAndDistance extends Object

A TimeAndDistance is an immutable class which represents both time and distance to a destination.

Nested Class Summary

@interface TimeAndDistance.DelaySeverity Indicates how heavy traffic is. 

Constant Summary

int DELAY_HEAVY
int DELAY_LIGHT
int DELAY_MEDIUM
int DELAY_NODATA

Public Constructor Summary

TimeAndDistance(int seconds, int meters)
TimeAndDistance(int seconds, int meters, int delaySeverity)

Public Method Summary

int
int
int

Inherited Method Summary

Constants

public static final int DELAY_HEAVY

Constant Value: 1

public static final int DELAY_LIGHT

Constant Value: 3

public static final int DELAY_MEDIUM

Constant Value: 2

public static final int DELAY_NODATA

Constant Value: 0

Public Constructors

public TimeAndDistance (int seconds, int meters)

Parameters
seconds
meters

public TimeAndDistance (int seconds, int meters, int delaySeverity)

Parameters
seconds
meters
delaySeverity

Public Methods

public int getDelaySeverity ()

public int getMeters ()

public int getSeconds ()