summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerOptions.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerOptions.java')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerOptions.java128
1 files changed, 93 insertions, 35 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerOptions.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerOptions.java
index 3adeb52ea7..82868e2888 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerOptions.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerOptions.java
@@ -6,7 +6,7 @@ import com.mapbox.mapboxsdk.geometry.LatLng;
/**
* Abstract builder class for composing custom Marker objects.
- *
+ * <p>
* Extending this class requires implementing Parceable interface.
*
* @param <U> Type of the marker to be composed
@@ -14,49 +14,107 @@ import com.mapbox.mapboxsdk.geometry.LatLng;
*/
public abstract class BaseMarkerOptions<U extends Marker, T extends BaseMarkerOptions<U, T>> implements Parcelable {
- protected LatLng position;
- protected String snippet;
- protected String title;
- protected Icon icon;
+ protected LatLng position;
+ protected String snippet;
+ protected String title;
+ protected Icon icon;
- public T position(LatLng position) {
- this.position = position;
- return getThis();
- }
+ /**
+ * Set the geographical location of the Marker.
+ *
+ * @param position the location to position the {@link Marker}.
+ * @return the object for which the method was called.
+ */
+ public T position(LatLng position) {
+ this.position = position;
+ return getThis();
+ }
- public T snippet(String snippet) {
- this.snippet = snippet;
- return getThis();
- }
+ /**
+ * Set the snippet of the Marker.
+ *
+ * @param snippet the snippet of the {@link Marker}.
+ * @return the object for which the method was called.
+ */
+ public T snippet(String snippet) {
+ this.snippet = snippet;
+ return getThis();
+ }
- public T title(String title) {
- this.title = title;
- return getThis();
- }
+ /**
+ * Set the title of the Marker.
+ *
+ * @param title the title of the {@link Marker}.
+ * @return the object for which the method was called.
+ */
+ public T title(String title) {
+ this.title = title;
+ return getThis();
+ }
- public T icon(Icon icon) {
- this.icon = icon;
- return getThis();
- }
+ /**
+ * Set the icon of the Marker.
+ *
+ * @param icon the icon of the {@link Marker}.
+ * @return the object for which the method was called.
+ */
+ public T icon(Icon icon) {
+ this.icon = icon;
+ return getThis();
+ }
- public T setIcon(Icon icon) {
- return icon(icon);
- }
+ /**
+ * Set the icon of the Marker.
+ *
+ * @param icon the icon of the {@link Marker}.
+ * @return the object for which the method was called.
+ */
+ public T setIcon(Icon icon) {
+ return icon(icon);
+ }
- public T setPosition(LatLng position) {
- return position(position);
- }
+ /**
+ * Set the geographical location of the Marker.
+ *
+ * @param position the location to position the {@link Marker}.
+ * @return the object for which the method was called.
+ */
+ public T setPosition(LatLng position) {
+ return position(position);
+ }
- public T setSnippet(String snippet) {
- return snippet(snippet);
- }
+ /**
+ * Set the snippet of the Marker.
+ *
+ * @param snippet the snippet of the {@link Marker}.
+ * @return the object for which the method was called.
+ */
+ public T setSnippet(String snippet) {
+ return snippet(snippet);
+ }
- public T setTitle(String title) {
- return title(title);
- }
+ /**
+ * Set the title of the Marker.
+ *
+ * @param title the title of the {@link Marker}.
+ * @return the object for which the method was called.
+ */
+ public T setTitle(String title) {
+ return title(title);
+ }
- public abstract T getThis();
+ /**
+ * Get the instance of the object for which this method was called.
+ *
+ * @return the object for which the this method was called.
+ */
+ public abstract T getThis();
- public abstract U getMarker();
+ /**
+ * Get the Marker.
+ *
+ * @return the Marker created from this builder.
+ */
+ public abstract U getMarker();
}