Class 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 Detail

      • hasGeometry

        public boolean hasGeometry()
        Returns true 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)
        Returns true 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)
        Returns true 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 property
        defaultValue - 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 property
        defaultValue - 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
      • getStringProperty

        public String getStringProperty​(String key)
        Returns a string value at specific property.
        Parameters:
        key - key of the property
        Returns:
        value of the property