Package org.pepstock.charba.client.geo
Class Feature
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.geo.Feature
-
public final class Feature extends NativeObjectContainer
Represents the region definition with all properties and geometries needed to draw the region.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getNumberProperty(String key)
Returns a number value at specific property.double
getNumberProperty(Key key)
Returns a number value at specific property.List<Key>
getPropertiesKeys()
Returns the list of properties names of the properties instance.ObjectType
getPropertyType(String key)
Returns the java script type of a property.ObjectType
getPropertyType(Key key)
Returns the java script type of a property.double
getPropertyValue(String key, double defaultValue)
Returns a number value at specific property.String
getPropertyValue(String key, String defaultValue)
Returns a string value at specific property.double
getPropertyValue(Key key, double defaultValue)
Returns a number value at specific property.String
getPropertyValue(Key key, String defaultValue)
Returns a string value at specific property.String
getStringProperty(String key)
Returns a string value at specific property.String
getStringProperty(Key key)
Returns a string value at specific property.String
getType()
Returns the type of the feature.boolean
hasGeometry()
Returnstrue
if the geometry property is set.boolean
hasProperty(String key)
Returnstrue
if the properties contain an element at specific property.boolean
hasProperty(Key key)
Returnstrue
if the properties contain an element at specific property.-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Method Detail
-
hasGeometry
public boolean hasGeometry()
Returnstrue
if the geometry property is set.- Returns:
true
if the geometry property is set
-
getType
public String getType()
Returns the type of the feature.- Returns:
- the type of the feature
-
hasProperty
public boolean hasProperty(Key key)
Returnstrue
if the properties contain an element at specific property.- Parameters:
key
- key of the property of java script object.- Returns:
true
if the properties contains an element at specific property
-
hasProperty
public boolean hasProperty(String key)
Returnstrue
if the properties contain an element at specific property.- Parameters:
key
- key of the property of java script object.- Returns:
true
if the properties contains an element at specific property
-
getPropertiesKeys
public List<Key> getPropertiesKeys()
Returns the list of properties names of the properties instance.- Returns:
- the list of properties names of the properties instance
-
getPropertyType
public ObjectType getPropertyType(Key key)
Returns the java script type of a property.- Parameters:
key
- name of the java script property- Returns:
- the java script type of the property
-
getPropertyType
public ObjectType getPropertyType(String key)
Returns the java script type of a property.- Parameters:
key
- name of the java script property- Returns:
- the java script type of the property
-
getPropertyValue
public double getPropertyValue(Key key, double defaultValue)
Returns a number value at specific property.- Parameters:
key
- key of the property of properties.defaultValue
- default value if the property is missing- Returns:
- value of the property
-
getPropertyValue
public double getPropertyValue(String key, double defaultValue)
Returns a number value at specific property.- Parameters:
key
- key of the property of properties.defaultValue
- default value if the property is missing- Returns:
- value of the property
-
getNumberProperty
public double getNumberProperty(Key key)
Returns a number value at specific property.- Parameters:
key
- key of the property of properties.- Returns:
- value of the property
-
getNumberProperty
public double getNumberProperty(String key)
Returns a number value at specific property.- Parameters:
key
- key of the property of properties.- Returns:
- value of the property
-
getPropertyValue
public String getPropertyValue(Key key, String defaultValue)
Returns a string value at specific property.- Parameters:
key
- key of the propertydefaultValue
- default value if the property is missing- Returns:
- value of the property
-
getPropertyValue
public String getPropertyValue(String key, String defaultValue)
Returns a string value at specific property.- Parameters:
key
- key of the propertydefaultValue
- default value if the property is missing- Returns:
- value of the property
-
getStringProperty
public String getStringProperty(Key key)
Returns a string value at specific property.- Parameters:
key
- key of the property- Returns:
- value of the property
-
-