diff options
author | Cameron Mace <cameron@mapbox.com> | 2016-12-16 16:19:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-16 16:19:15 -0500 |
commit | 20b958301eb208fe9ed0ae8edfb14b6f3741d8f2 (patch) | |
tree | 94ae0ce250cda159be13f9a21cc70c92d4908974 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyValue.java | |
parent | f95b4838ea816b9da0c151a953a1f98f97c79a39 (diff) | |
download | qtlocation-mapboxgl-20b958301eb208fe9ed0ae8edfb14b6f3741d8f2.tar.gz |
Adds checkstyle to CI (#7442)
* adds checkstyle to CI
* fixed gradlew path
* resolved testapp checkstyle violations
* added back mapboxMap variable for test
* checkstyle annotations
* checkstyle SDK round 1
* maps package checkstyle
* rest of SDK checkstyle
* checkstyle gesture library
* checkstyle test
* finished rest of test checkstyle
* resolved all checkstyle errors
* fixed class name
* removed old test file
* fixed camera postion test
* fixed native crash
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyValue.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyValue.java | 74 |
1 files changed, 38 insertions, 36 deletions
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 542ec46e1f..c404f07c76 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 @@ -1,6 +1,7 @@ package com.mapbox.mapboxsdk.style.layers; import android.support.annotation.Nullable; + import timber.log.Timber; /** @@ -8,48 +9,49 @@ import timber.log.Timber; */ public class PropertyValue<T> { - private final Object value; + private final Object value; - /* package */ PropertyValue(Object value) { - this.value = value; - } + /* package */ PropertyValue(Object value) { + this.value = value; + } - public boolean isNull() { - return value == null; - } + public boolean isNull() { + return value == null; + } - public boolean isFunction() { - return !isNull() && value instanceof Function; - } + public boolean isFunction() { + return !isNull() && value instanceof Function; + } - public boolean isValue() { - return !isNull() && !isFunction(); - } + public boolean isValue() { + return !isNull() && !isFunction(); + } - @Nullable - public Function<T> getFunction() { - if (isFunction()) { - //noinspection unchecked - return (Function<T>) value; - } else { - Timber.w("not a function, try value"); - return null; - } + @Nullable + public Function<T> getFunction() { + if (isFunction()) { + //noinspection unchecked + return (Function<T>) value; + } else { + Timber.w("not a function, try value"); + return null; } - - @Nullable - public T getValue() { - if (isValue()) { - //noinspection unchecked - return (T) value; - } else { - Timber.w("not a value, try function"); - return null; - } + } + + @Nullable + public T getValue() { + if (isValue()) { + //noinspection unchecked + return (T) value; + } else { + Timber.w("not a value, try function"); + return null; } + } - @Override - public String toString() { - return String.format("%s (%s)", getClass().getSimpleName(), value != null ? value.getClass().getSimpleName() : null); - } + @Override + public String toString() { + return String.format("%s (%s)", getClass().getSimpleName(), value != null + ? value.getClass().getSimpleName() : null); + } } |