Class PlainStringBuilder.DefaultPlainStringBuilder

java.lang.Object
zeroecho.sdk.builders.core.PlainStringBuilder.DefaultPlainStringBuilder
All Implemented Interfaces:
DataContentBuilder<PlainString>, PlainStringBuilder
Enclosing interface:
PlainStringBuilder

public static final class PlainStringBuilder.DefaultPlainStringBuilder extends Object implements PlainStringBuilder
Default implementation of the PlainStringBuilder interface.

Builds a PlainString instance using the specified string value.

  • Method Details

    • value

      public PlainStringBuilder value(String value)
      Description copied from interface: PlainStringBuilder
      Sets the string value that the PlainString instance will contain.
      Specified by:
      value in interface PlainStringBuilder
      Parameters:
      value - the string value; may be null or empty depending on usage
      Returns:
      this builder instance
    • build

      public PlainString build(boolean encrypt)
      Description copied from interface: DataContentBuilder
      Constructs and returns a new DataContent instance based on the builder's current configuration.
      Specified by:
      build in interface DataContentBuilder<PlainString>
      Parameters:
      encrypt - whether the resulting DataContent should be configured for encryption (true) or decryption (false). In encryption mode, additional headers or metadata may be inserted into the stream which must be retained for successful decryption.
      Returns:
      the constructed DataContent instance