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 doublegetNumberProperty(String key)Returns a number value at specific property.doublegetNumberProperty(Key key)Returns a number value at specific property.List<Key>getPropertiesKeys()Returns the list of properties names of the properties instance.ObjectTypegetPropertyType(String key)Returns the java script type of a property.ObjectTypegetPropertyType(Key key)Returns the java script type of a property.doublegetPropertyValue(String key, double defaultValue)Returns a number value at specific property.StringgetPropertyValue(String key, String defaultValue)Returns a string value at specific property.doublegetPropertyValue(Key key, double defaultValue)Returns a number value at specific property.StringgetPropertyValue(Key key, String defaultValue)Returns a string value at specific property.StringgetStringProperty(String key)Returns a string value at specific property.StringgetStringProperty(Key key)Returns a string value at specific property.StringgetType()Returns the type of the feature.booleanhasGeometry()Returnstrueif the geometry property is set.booleanhasProperty(String key)Returnstrueif the properties contain an element at specific property.booleanhasProperty(Key key)Returnstrueif the properties contain an element at specific property.-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkAndGetColor, 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, 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, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Method Detail
-
hasGeometry
public boolean hasGeometry()
Returnstrueif the geometry property is set.- Returns:
trueif 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)
Returnstrueif the properties contain an element at specific property.- Parameters:
key- key of the property of java script object.- Returns:
trueif the properties contains an element at specific property
-
hasProperty
public boolean hasProperty(String key)
Returnstrueif the properties contain an element at specific property.- Parameters:
key- key of the property of java script object.- Returns:
trueif 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
-
-