public static final class DataProperty.Builder extends Object implements AutoCloseable
Builder
that allows DataProperty
instances to be created.
Typical usage would be create a DataProperty.Builder
using DataProperty#newBuilder
, specifying the data property's name. Then specify the value type and finally build()
the data property. The following snippet shows how this is done for a simple example data property:
return DataProperty.newBuilder()
.name("geometry")
.valueType(DataType.getGeometryType())
.build();
Constructor and Description |
---|
Builder(DataProperty.Builder other) |
Modifier and Type | Method and Description |
---|---|
DataProperty |
build()
Build the data type, including the value type that was set on this builder.
|
void |
close() |
protected void |
finalize() |
DataProperty.Builder |
name(String name)
Sets the name of the data property.
|
DataProperty.Builder |
valueType(DataType type)
Sets the data type for the data property under construction.
|
public Builder(@NotNull DataProperty.Builder other)
public void close()
close
in interface AutoCloseable
@NotNull public DataProperty build() throws IllegalStateException
After calling this function, this builder should no longer be used.
IllegalStateException
- If not all mandatory parameters are set.@NotNull public DataProperty.Builder valueType(@NotNull DataType type)
Calling this function is mandatory.
type
- the data type for the data property under construction.@NotNull public DataProperty.Builder name(@NotNull String name)
Calling this function is mandatory.
name
- name of the data property.