PlaceLikelihood

public abstract class PlaceLikelihood implements Parcelable


A Place and the relative likelihood of the place being the best match within the list of returned places for a single request.

Summary

Constants

static final double

The highest likelihood possible, for example, the user is most likely to be here.

static final double

The lowest likelihood possible, for example, the user is least likely to be here.

Public constructors

Public methods

abstract @FloatRange(from = 0.0, to = 1.0) double

Returns a value indicating the degree of confidence that the device is at the corresponding Place from LIKELIHOOD_MIN_VALUE to LIKELIHOOD_MAX_VALUE (inclusive).

abstract Place

Returns the Place associated with this PlaceLikelihood.

static PlaceLikelihood
newInstance(Place place, @FloatRange(from = 0.0, to = 1.0) double likelihood)

Creates a PlaceLikelihood.

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)

Constants

LIKELIHOOD_MAX_VALUE

public static final double LIKELIHOOD_MAX_VALUE = 1.0

The highest likelihood possible, for example, the user is most likely to be here. For more information, see getLikelihood.

LIKELIHOOD_MIN_VALUE

public static final double LIKELIHOOD_MIN_VALUE = 0.0

The lowest likelihood possible, for example, the user is least likely to be here. For more information, see getLikelihood.

Public constructors

PlaceLikelihood

public PlaceLikelihood()

Public methods

getLikelihood

public abstract @FloatRange(from = 0.0, to = 1.0) double getLikelihood()

Returns a value indicating the degree of confidence that the device is at the corresponding Place from LIKELIHOOD_MIN_VALUE to LIKELIHOOD_MAX_VALUE (inclusive).

getPlace

public abstract Place getPlace()

Returns the Place associated with this PlaceLikelihood.

newInstance

public static PlaceLikelihood newInstance(Place place, @FloatRange(from = 0.0, to = 1.0) double likelihood)

Creates a PlaceLikelihood.

Throws
java.lang.IllegalArgumentException

if the value of likelihood is not within the range: LIKELIHOOD_MIN_VALUE<= likelihood<= LIKELIHOOD_MAX_VALUE.