From 6179110b6bfe8ee0880a055a31c12a88f9bd9b20 Mon Sep 17 00:00:00 2001 From: Tobrun Date: Thu, 8 Mar 2018 16:27:02 +0100 Subject: [android] - add expression conversion, add getters (#11352) --- .../style/functions/stops/ExponentialStops.java | 97 ---------------------- 1 file changed, 97 deletions(-) delete mode 100644 platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/ExponentialStops.java (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/ExponentialStops.java') diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/ExponentialStops.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/ExponentialStops.java deleted file mode 100644 index d47aa1fc91..0000000000 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/ExponentialStops.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.mapbox.mapboxsdk.style.functions.stops; - -import android.support.annotation.NonNull; -import android.support.annotation.Size; - -import java.util.Arrays; -import java.util.Iterator; -import java.util.Map; - -/** - * The {@link Stops} implementation for exponential functions - * - * @param the input type - * @param the output type - */ -public class ExponentialStops extends IterableStops> { - - private float base; - private final Stop[] stops; - - /** - * Create exponential stops with an explicit base. Use through {@link Stops#exponential(Stop[])} - * - * @param base The exponential base of the interpolation curve. It controls the rate at which the function output - * increases. Higher values make the output increase more towards the high end of the range. - * With values close to 1 the output increases linearly. - * @param stops the stops - */ - @SafeVarargs - public ExponentialStops(Float base, @NonNull @Size(min = 1) Stop... stops) { - this.base = base != null ? base : 1.0f; - this.stops = stops; - } - - /** - * Create exponential stops without an explicit base. Use through {@link Stops#exponential(Stop[])} - * - * @param stops the stops - */ - @SafeVarargs - public ExponentialStops(@NonNull @Size(min = 1) Stop... stops) { - this(null, stops); - } - - /** - * Set the exponential base - * - * @param base the base to use in the exponential function - * @return this (for chaining) - */ - public ExponentialStops withBase(float base) { - this.base = base; - return this; - } - - /** - * @return The exponential base - */ - public float getBase() { - return base; - } - - /** - * {@inheritDoc} - */ - @Override - public Map toValueObject() { - Map map = super.toValueObject(); - map.put("base", base); - map.put("stops", toValueObjects(stops)); - return map; - } - - /** - * {@inheritDoc} - */ - @Override - public String getTypeName() { - return "exponential"; - } - - /** - * {@inheritDoc} - */ - @Override - public Iterator> iterator() { - return Arrays.asList(stops).iterator(); - } - - /** - * {@inheritDoc} - */ - @Override - public int size() { - return stops.length; - } -} -- cgit v1.2.1