From a9f52e24e63af6d322b3f4744a38aab395344b1d Mon Sep 17 00:00:00 2001 From: Tobrun Date: Tue, 20 Jun 2017 15:48:24 +0200 Subject: Revisit Javadoc for 5.1.0 (#9266) * [android] - revisit public API javadoc * [android] fix javadoc minor mistakes and typos * grammar tweak * add missing public javadoc --- .../mapboxsdk/style/layers/PropertyValue.java | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyValue.java') diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyValue.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyValue.java index 68727c8a4f..a57c440df4 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyValue.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyValue.java @@ -30,14 +30,29 @@ public class PropertyValue { this.value = value; } + /** + * Returns if this is null + * + * @return true if this is null, false if not + */ public boolean isNull() { return value == null; } + /** + * Returns if this is a function. + * + * @return true if is a function, false if not + */ public boolean isFunction() { return !isNull() && value instanceof Function; } + /** + * Returns if this is a value. + * + * @return true if is a value, false if not + */ public boolean isValue() { return !isNull() && !isFunction(); } @@ -53,6 +68,11 @@ public class PropertyValue { } } + /** + * Get the value of the property. + * + * @return the property value + */ @Nullable public T getValue() { if (isValue()) { @@ -64,6 +84,11 @@ public class PropertyValue { } } + /** + * Get the color int value of the property if the value is a color. + * + * @return the color int value of the property, null if not a color value + */ @ColorInt @Nullable public Integer getColorInt() { @@ -80,6 +105,11 @@ public class PropertyValue { } } + /** + * Get the string representation of a property value. + * + * @return the string representation + */ @Override public String toString() { return String.format("%s: %s", name, value); -- cgit v1.2.1