AnnotatedData

  • AnnotatedData is a class used to return data with an annotation, currently only indicating if the data is stale.

  • The get() method returns the annotated data.

  • The isStale() method returns true if the data returned by get() is stale, which usually indicates a network error and that cached data was used.

public class AnnotatedData extends Object

Class to return annotated data. Currently, the only annotation is whether the data is stale or not.

Public Method Summary

T
get()
Returns the data that is annotated by this class.
boolean
isStale()
Returns true if the data returned by get() is stale.

Inherited Method Summary

Public Methods

public T get ()

Returns the data that is annotated by this class.

public boolean isStale ()

Returns true if the data returned by get() is stale. This usually indicates that there was a network error and data was returned from the local cache.