public class

FeatureBuilder

extends Object
java.lang.Object
   ↳ com.carto.geometry.FeatureBuilder
Known Direct Subclasses

Class Overview

A feature builder for constructing individual features.

Summary

Public Constructors
FeatureBuilder()
Constructs a FeatureBuilder with empty state.
Public Methods
Feature buildFeature()
Builds a new feature from the state.
synchronized void delete()
boolean equals(Object obj)
Checks if this object is equal to the specified object.
Geometry getGeometry()
Returns the geometry of the builder.
Variant getPropertyValue(String key)
Returns a specified property value of the builder.
int hashCode()
Returns the hash value of this object.
void setGeometry(Geometry geometry)
Sets the geometry of the builder.
void setPropertyValue(String key, Variant value)
Sets an individual property value of the builder.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public FeatureBuilder ()

Constructs a FeatureBuilder with empty state.

Public Methods

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.

public synchronized void delete ()

public boolean equals (Object obj)

Checks if this object is equal to the specified object.

Parameters
obj The reference object.
Returns
  • True when objects are equal, false otherwise.

public Geometry getGeometry ()

Returns the geometry of the builder.

Returns
  • The geometry of the builder.

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.

public int hashCode ()

Returns the hash value of this object.

Returns
  • The hash value of this object.

public void setGeometry (Geometry geometry)

Sets the geometry of the builder.

Parameters
geometry The new geometry to use for the builder.

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.