• public final class MyPlaces
    extends NativeBase

    Provides means to populate personal places data source. Also acts as a owner of the collection of personal places. MyPlaces is memory-only object: nothing is persisted and/or sent over the network. Client has full control on how to store personal places.

    • Constructor Detail

      • MyPlaces

        public MyPlaces()

        Creates a new instance of this class.

    • Method Detail

      • addPlace

        @NonNull
        public TaskHandle addPlace​(@NonNull
                                   GeoPlace place,
                                   @NonNull
                                   OnTaskCompleted callback)

        Adds a place to this data source.

        Parameters:
        place -

        The place.

        callback -

        The callback to be called when task is completed.

        Returns:

        Handle that will be used to manipulate the execution of the task.

      • addPlaces

        @NonNull
        public TaskHandle addPlaces​(@NonNull
                                    java.util.List<GeoPlace> places,
                                    @NonNull
                                    OnTaskCompleted callback)

        Adds a list of places to this data source.

        Parameters:
        places -

        Places

        callback -

        The callback to be called when task is completed.

        Returns:

        Handle that will be used to manipulate the execution of the task.

      • removePlace

        @NonNull
        public TaskHandle removePlace​(@NonNull
                                      java.lang.String placeId,
                                      @NonNull
                                      OnTaskCompleted callback)

        Removes a place from this data source.

        Parameters:
        placeId -

        The place id

        callback -

        The callback to be called when task is completed.

        Returns:

        Handle that will be used to manipulate the execution of the task.

      • removePlaces

        @NonNull
        public TaskHandle removePlaces​(@NonNull
                                       java.util.List<java.lang.String> placeIds,
                                       @NonNull
                                       OnTaskCompleted callback)

        Removes a list of places from this data source.

        Parameters:
        placeIds -

        Place ids

        callback -

        The callback to be called when task is completed.

        Returns:

        Handle that will be used to manipulate the execution of the task.

      • removeAll

        @NonNull
        public TaskHandle removeAll​(@NonNull
                                    OnTaskCompleted callback)

        Removes all places from this data source.

        Parameters:
        callback -

        The callback to be called when task is completed.

        Returns:

        Handle that will be used to manipulate the execution of the task.

      • getPlaces

        @NonNull
        public java.util.List<GeoPlace> getPlaces()

        Gets the list of places which currently belongs to this data source. The returned list is a clone of the internal list and thus changing it has no effect on the data source.

        Returns:

        The list of places which currently belong to this data source. This list is a clone of the internal list and thus changing it has no effect on the data source.