Package com.massifmaps.geometry
Class FeatureBuilder
java.lang.Object
com.massifmaps.geometry.FeatureBuilder
- Direct Known Subclasses:
VectorTileFeatureBuilder
A feature builder for constructing individual features.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBuilds a new feature from the state.booleanChecks if this object is equal to the specified object.Returns the geometry of the builder.getPropertyValue(String key) Returns a specified property value of the builder.inthashCode()Returns the hash value of this object.voidsetGeometry(Geometry geometry) Sets the geometry of the builder.voidsetPropertyValue(String key, Variant value) Sets an individual property value of the builder.
-
Constructor Details
-
FeatureBuilder
public FeatureBuilder()Constructs a FeatureBuilder with empty state.
-
-
Method Details
-
equals
Checks if this object is equal to the specified object. -
hashCode
public int hashCode()Returns the hash value of this object. -
getGeometry
Returns the geometry of the builder.- Returns:
- The geometry of the builder.
-
setGeometry
Sets the geometry of the builder.- Parameters:
geometry- The new geometry to use for the builder.
-
getPropertyValue
Returns a specified property value of the builder.- Parameters:
key- The name of the property to return.- Returns:
- The value of the property. If the key does not exist an empty variant is returned.
-
setPropertyValue
Sets an individual property value of the builder.- Parameters:
key- The name of the property to set.value- The value of the property.
-
buildFeature
Builds a new feature from the state.- Returns:
- A new feature based on the builder state. Can be null if the geometry is not specified.
-