PlaceLikelihoodBufferResponse

public class PlaceLikelihoodBufferResponse extends Response<R extends AbstractDataBuffer<T> & Result>
implements DataBuffer<PlaceLikelihood>

Data structure providing access to a list of PlaceLikelihood objects.

A PlaceLikelihoodBufferResponse contains a number of candidate Places, as well as an associated likelihood that each Place represents the correct location. For more information, see the developer's guide.

The likelihoods in a given PlaceLikelihoodBufferResponse may not sum to 1.0.

NOTE: The calling application must release() this object after it is done with it to prevent a memory leak. Refer to the developer's guide for more information about handling buffers.

Public Method Summary

void
PlaceLikelihood
get(int position)
Returns an element on specified position.
CharSequence
getAttributions()
Returns the attributions to be shown to the user.
int
Bundle
boolean
Iterator<PlaceLikelihood>
void
release()
Releases resources used by the buffer.
Iterator<PlaceLikelihood>
singleRefIterator()
In order to use this iterator it should be supported by particular DataBuffer.

Inherited Method Summary

Public Methods

public void close ()

public PlaceLikelihood get (int position)

Returns an element on specified position.

public CharSequence getAttributions ()

Returns the attributions to be shown to the user.

These are aggregated attributions for all the places in the buffer.

We recommend placing this information below any place information. See Displaying Attributions for more details.

Returns
  • The attributions in HTML format, or null if there are none.

public int getCount ()

public Bundle getMetadata ()

public boolean isClosed ()

public Iterator<PlaceLikelihood> iterator ()

public void release ()

Releases resources used by the buffer. This method is idempotent.

public Iterator<PlaceLikelihood> singleRefIterator ()

In order to use this iterator it should be supported by particular DataBuffer. Be careful: there will be single reference while iterating. If you are not sure - DO NOT USE this iterator.