CustomizableScheme
The class CustomizableScheme is a member of com.here.android.mpa.mapping.customization .
Class Summary
public class CustomizableScheme
extends java.lang.Object
Represent a scheme that can be customize.
[For complete information, see the section Class Details]
Nested Class Summary
Nested Classes |
---|
Error code specific to configuration scheme or variable |
Method Summary
Methods |
---|
For documentation, see java.lang.Object |
Retrieve name of customizable scheme object. |
Retrieve color of an existing variable. |
Retrieve value of an existing variable. |
Retrieve value to an existent integer variable. |
For documentation, see java.lang.Object |
Returns true if the customizable scheme object is in a valid state, false otherwise. |
Sets color for an existing variable. |
Sets value to an existing float variable. |
Sets value to existing integer variable. |
Class Details
Represent a scheme that can be customize. A customizable scheme cannot be directly constructed, but one can be created through a Map object, by using an existing base Map.Scheme. Call getCustomizableScheme(String) to get Customizable Scheme instance.
Method Details
public boolean equals (Object obj)
For documentation, see java.lang.Object
Parameters:
-
obj
public String getName ()
Retrieve name of customizable scheme object.
Returns:
name of customizable scheme object OR null
if this scheme is not valid.
public int getVariableValue (SchemeColorProperty variable, double zoomLevel)
Retrieve color of an existing variable.
Parameters:
-
variable
variable name
-
zoomLevel
Get value of variable for this zoom level.
Returns:
color value of variable for given zoom level.
Throws:
-
IllegalArgumentException
if variable is null OR zoomLevel is not valid
public float getVariableValue (SchemeFloatProperty variable, double zoomLevel)
Retrieve value of an existing variable.
Parameters:
-
variable
variable name
-
zoomLevel
Get value of variable for this zoom level.
Returns:
value of variable for given zoom level.
Throws:
-
IllegalArgumentException
if variable is null OR zoomLevel is not valid
public int getVariableValue (SchemeIntegerProperty variable, double zoomLevel)
Retrieve value to an existent integer variable.
Parameters:
-
variable
variable name
-
zoomLevel
Get value of variable for this zoom level.
Returns:
value of variable for given zoom level.
Throws:
-
IllegalArgumentException
if variable is null OR zoomLevel is not valid
public int hashCode ()
For documentation, see java.lang.Object
public boolean isValid ()
Returns true if the customizable scheme object is in a valid state, false otherwise.
A scheme may not be valid either because the scheme was removed or a new configuration has been set.
Returns:
true if the scheme is valid, false otherwise.
public ErrorCode setVariableValue (SchemeColorProperty variable, int value, ZoomRange range)
Sets color for an existing variable.
Parameters:
-
variable
Name of color variable. Can be get from CustomizableVariables class.
-
value
Value to set.
-
range
Zoom range where this variable value will come into effect.
Returns:
- ERROR_NONE if operation was successful.
- ERROR_INVALID_PARAMETERS if there's no variable with that name OR variable is null OR range is null or not valid
- ERROR_INVALID_OPERATION if this scheme is not valid.
- ERROR_OUT_OF_MEMORY if operation failed due to an out of memory error.
public ErrorCode setVariableValue (SchemeFloatProperty variable, float value, ZoomRange range)
Sets value to an existing float variable.
Parameters:
-
variable
Name of variable. Can be get from CustomizableVariables class.
-
value
Value to set.
-
range
Zoom range where this variable value will come into effect.
Returns:
- ERROR_NONE if operation was successful.
- ERROR_INVALID_PARAMETERS if there's no variable with that name OR variable is null OR range is null or not valid
- ERROR_INVALID_OPERATION if this scheme is not valid.
- ERROR_OUT_OF_MEMORY if operation failed due to an out of memory error.
public ErrorCode setVariableValue (SchemeIntegerProperty variable, int value, ZoomRange range)
Sets value to existing integer variable.
Parameters:
-
variable
Name of variable. Can be get from CustomizableVariables class.
-
value
Value to set.
-
range
Zoom range where this variable value will come into effect.
Returns:
- ERROR_NONE if operation was successful.
- ERROR_INVALID_PARAMETERS if there's no variable with that name OR variable is null OR range is null or not valid
- ERROR_INVALID_OPERATION if this scheme is not valid.
- ERROR_OUT_OF_MEMORY if operation failed due to an out of memory error.