diff --git a/MyTracksLib/src/com/google/android/apps/mytracks/content/MyTracksProviderUtils.java b/MyTracksLib/src/com/google/android/apps/mytracks/content/MyTracksProviderUtils.java index 488048355..f0839180e 100644 --- a/MyTracksLib/src/com/google/android/apps/mytracks/content/MyTracksProviderUtils.java +++ b/MyTracksLib/src/com/google/android/apps/mytracks/content/MyTracksProviderUtils.java @@ -312,7 +312,7 @@ public interface MyTracksProviderUtils { Waypoint createWaypoint(Cursor cursor); /** - * A lightweight wrapper around the original {@link Iterator} with a method to clean up. + * A lightweight wrapper around the original {@link Cursor} with a method to clean up. */ interface LocationIterator extends Iterator { /** @@ -325,11 +325,19 @@ public interface MyTracksProviderUtils { * A factory for creating new {@class Location}s. */ interface LocationFactory { + /** + * Creates a new {@link Location} object to be populated from the underlying database record. + * It's up to the implementing class to decide whether to create a new instance or reuse + * existing to optimize for speed. + * + * @return a {@link Location} to be populated from the database. + */ Location createLocation(); } /** - * The default {@class Location}s factory, which creates a new location of 'gps' type. + * The default {@class Location}s factory, which creates a new location of 'gps' type each + * time the user advances to the next element using {@link LocationIterator#next()} method. */ LocationFactory DEFAULT_LOCATION_FACTORY = new LocationFactory() { @Override diff --git a/MyTracksLib/src/com/google/android/apps/mytracks/content/MyTracksProviderUtilsImpl.java b/MyTracksLib/src/com/google/android/apps/mytracks/content/MyTracksProviderUtilsImpl.java index 0b186618a..c81bf88d3 100644 --- a/MyTracksLib/src/com/google/android/apps/mytracks/content/MyTracksProviderUtilsImpl.java +++ b/MyTracksLib/src/com/google/android/apps/mytracks/content/MyTracksProviderUtilsImpl.java @@ -936,8 +936,8 @@ public class MyTracksProviderUtilsImpl implements MyTracksProviderUtils { } @Override - public LocationIterator getLocationIterator(long trackId, - LocationFactory locationFactory) { + public LocationIterator getLocationIterator(long trackId, LocationFactory locationFactory) { + // TODO: Implement it. throw new UnsupportedOperationException(); } }