Interface FeatureBuilder.FromScratchBuildable

Enclosing interface:
FeatureBuilder

public static interface FeatureBuilder.FromScratchBuildable
This interface enables the creation of a Feature object from scratch.
  • Method Details

    • definition

      FeatureBuilder.FromScratchBuildable definition(@Nullable FeatureDefinition featureDefinition)
      Sets the specified Definition to the Feature to be built.
      Parameters:
      featureDefinition - the Definition to be set or null.
      Returns:
      this builder to allow method chaining.
    • properties

      FeatureBuilder.FromScratchBuildable properties(@Nullable FeatureProperties properties)
      Sets the properties of the Feature.
      Parameters:
      properties - the properties of the Feature to be created or null
      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 or null.
      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 or null
      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 or null.
      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 - if featureId is null.
      IllegalArgumentException - if featureId is empty.