public static final class Creator.Builder extends Object implements AutoCloseable
Constructor and Description |
---|
Builder(Creator.Builder other) |
Modifier and Type | Method and Description |
---|---|
Creator |
build()
Returns a new creator, based on the properties set on this builder.
|
void |
close() |
Creator.Builder |
featureCreator(IFeatureCreator featureCreator)
Sets the creator that will create a feature instance.
|
protected void |
finalize() |
Creator.Builder |
layer(Layer layer)
Sets the layer to which new features will be added.
|
Creator.Builder |
map(Map map)
Sets the map on which features are created.
|
public Builder(@NotNull Creator.Builder other)
public void close()
close
in interface AutoCloseable
@NotNull public Creator build() throws IllegalStateException
IllegalStateException
- if not all mandatory parameters are set@NotNull public Creator.Builder map(@NotNull Map map) throws NullPointerException
This parameter is mandatory. If it is not set, Creator.Builder#build
will throw an exception.
map
- the Map
on which to add featuresNullPointerException
- when the map is null
.@NotNull public Creator.Builder layer(@NotNull Layer layer) throws NullPointerException, IllegalArgumentException
Calling this method is mandatory. If it is not set, Creator.Builder#build
will throw an exception.
This method will thrown an exception when it contains a model without IFeatureModelUpdater
.
layer
- the layer to which new features need to be added.NullPointerException
- when the layer is null
.IllegalArgumentException
- when the layer is not a FeatureLayer
.@NotNull public Creator.Builder featureCreator(@NotNull IFeatureCreator featureCreator) throws NullPointerException
featureCreator
- the creator that will create a feature instanceNullPointerException
- when the feature creator is null
.