Package org.eclipse.ditto.things.model
Interface FeatureBuilder.FromScratchBuildable
- Enclosing interface:
- FeatureBuilder
public static interface FeatureBuilder.FromScratchBuildable
This interface enables the creation of a
Feature object from scratch.-
Method Summary
Modifier and TypeMethodDescriptiondefinition(FeatureDefinition featureDefinition) Sets the specified Definition to the Feature to be built.desiredProperties(org.eclipse.ditto.json.JsonObject desiredProperties) Sets the desired properties of the Feature.desiredProperties(FeatureProperties desiredProperties) Sets the desired properties of the Feature.properties(org.eclipse.ditto.json.JsonObject properties) Sets the properties of the Feature.properties(FeatureProperties properties) Sets the properties of the Feature.Sets the provided ID instead of the one which was possibly contained in the Feature's JSON.
-
Method Details
-
definition
Sets the specified Definition to the Feature to be built.- Parameters:
featureDefinition- the Definition to be set ornull.- Returns:
- this builder to allow method chaining.
-
properties
Sets the properties of the Feature.- Parameters:
properties- the properties of the Feature to be created ornull- Returns:
- this builder to allow method chaining.
-
properties
FeatureBuilder.FromScratchBuildable properties(@Nullable org.eclipse.ditto.json.JsonObject properties) Sets the properties of the Feature.- Parameters:
properties- the properties of the Feature to be created ornull.- Returns:
- this builder to allow method chaining.
-
desiredProperties
FeatureBuilder.FromScratchBuildable desiredProperties(@Nullable FeatureProperties desiredProperties) Sets the desired properties of the Feature.- Parameters:
desiredProperties- the desired properties of the Feature to be created ornull- Returns:
- this builder to allow method chaining.
- Since:
- 1.5.0
-
desiredProperties
FeatureBuilder.FromScratchBuildable desiredProperties(@Nullable org.eclipse.ditto.json.JsonObject desiredProperties) Sets the desired properties of the Feature.- Parameters:
desiredProperties- the desired properties of the Feature to be created ornull.- Returns:
- this builder to allow method chaining.
- Since:
- 1.5.0
-
withId
Sets the provided ID instead of the one which was possibly contained in the Feature's JSON.- Parameters:
featureId- the ID to use in the Feature to be created.- Returns:
- this builder to allow method chaining.
- Throws:
NullPointerException- iffeatureIdisnull.IllegalArgumentException- iffeatureIdis empty.
-