Class FeatureBuilder

java.lang.Object
com.massifmaps.geometry.FeatureBuilder
Direct Known Subclasses:
VectorTileFeatureBuilder

public class FeatureBuilder extends Object
A feature builder for constructing individual features.
  • Constructor Details

    • FeatureBuilder

      public FeatureBuilder()
      Constructs a FeatureBuilder with empty state.
  • Method Details

    • equals

      public boolean equals(Object obj)
      Checks if this object is equal to the specified object.
      Overrides:
      equals in class Object
      Parameters:
      obj - The reference object.
      Returns:
      True when objects are equal, false otherwise.
    • hashCode

      public int hashCode()
      Returns the hash value of this object.
      Overrides:
      hashCode in class Object
      Returns:
      The hash value of this object.
    • getGeometry

      public Geometry getGeometry()
      Returns the geometry of the builder.
      Returns:
      The geometry of the builder.
    • setGeometry

      public void setGeometry(Geometry geometry)
      Sets the geometry of the builder.
      Parameters:
      geometry - The new geometry to use for the builder.
    • getPropertyValue

      public Variant getPropertyValue(String key)
      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

      public void setPropertyValue(String key, Variant value)
      Sets an individual property value of the builder.
      Parameters:
      key - The name of the property to set.
      value - The value of the property.
    • buildFeature

      public Feature 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.