Package com.luciad.create
Class Creator.Builder
java.lang.Object
com.luciad.create.Creator.Builder
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
Creator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns a new creator, based on the properties set on this builder.voidclose()featureCreator(IFeatureCreator featureCreator) Sets the creator that will create a feature instance.protected voidfinalize()Sets the layer to which new features will be added.Sets the map on which features are created.
-
Constructor Details
-
Builder
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
build
Returns a new creator, based on the properties set on this builder.- Returns:
- a new creator.
- Throws:
IllegalStateException- if not all mandatory parameters are set
-
map
Sets the map on which features are created.This parameter is mandatory. If it is not set,
Creator.Builder#buildwill throw an exception.- Parameters:
map- theMapon which to add features- Returns:
- this builder
- Throws:
NullPointerException- when the map isnull.
-
layer
@NotNull public Creator.Builder layer(@NotNull Layer layer) throws NullPointerException, IllegalArgumentException Sets the layer to which new features will be added.Calling this method is mandatory. If it is not set,
Creator.Builder#buildwill throw an exception.This method will thrown an exception when it contains a model without
IFeatureModelUpdater.- Parameters:
layer- the layer to which new features need to be added.- Returns:
- this builder
- Throws:
NullPointerException- when the layer isnull.IllegalArgumentException- when the layer is not aFeatureLayer.
-
featureCreator
@NotNull public Creator.Builder featureCreator(@NotNull IFeatureCreator featureCreator) throws NullPointerException Sets the creator that will create a feature instance.- Parameters:
featureCreator- the creator that will create a feature instance- Returns:
- this builder
- Throws:
NullPointerException- when the feature creator isnull.
-