Package com.io7m.smfj.processing.api
Class SMFFilterCommandModule.Builder
- java.lang.Object
-
- com.io7m.smfj.processing.api.SMFFilterCommandModule.Builder
-
- Enclosing class:
- SMFFilterCommandModule
public static final class SMFFilterCommandModule.Builder extends java.lang.ObjectBuilds instances of typeSMFFilterCommandModule. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SMFFilterCommandModulebuild()Builds a newSMFFilterCommandModule.SMFFilterCommandModule.Builderfrom(SMFFilterCommandModuleType instance)Fill a builder with attribute values from the providedSMFFilterCommandModuleTypeinstance.SMFFilterCommandModule.BuilderputAllParsers(java.util.Map<java.lang.String,? extends SMFFilterCommandParserType> entries)Put all mappings from the specified map as entries toparsersmap.SMFFilterCommandModule.BuilderputParsers(java.lang.String key, SMFFilterCommandParserType value)Put one entry to theparsersmap.SMFFilterCommandModule.BuilderputParsers(java.util.Map.Entry<java.lang.String,? extends SMFFilterCommandParserType> entry)Put one entry to theparsersmap.SMFFilterCommandModule.BuildersetName(java.lang.String name)Initializes the value for thenameattribute.SMFFilterCommandModule.BuildersetParsers(java.util.Map<java.lang.String,? extends SMFFilterCommandParserType> entries)Sets or replaces all mappings from the specified map as entries for theparsersmap.
-
-
-
Method Detail
-
from
public final SMFFilterCommandModule.Builder from(SMFFilterCommandModuleType instance)
Fill a builder with attribute values from the providedSMFFilterCommandModuleTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setName
public final SMFFilterCommandModule.Builder setName(java.lang.String name)
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
putParsers
public final SMFFilterCommandModule.Builder putParsers(java.lang.String key, SMFFilterCommandParserType value)
Put one entry to theparsersmap.- Parameters:
key- The key in the parsers mapvalue- The associated value in the parsers map- Returns:
thisbuilder for use in a chained invocation
-
putParsers
public final SMFFilterCommandModule.Builder putParsers(java.util.Map.Entry<java.lang.String,? extends SMFFilterCommandParserType> entry)
Put one entry to theparsersmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
setParsers
public final SMFFilterCommandModule.Builder setParsers(java.util.Map<java.lang.String,? extends SMFFilterCommandParserType> entries)
Sets or replaces all mappings from the specified map as entries for theparsersmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the parsers map- Returns:
thisbuilder for use in a chained invocation
-
putAllParsers
public final SMFFilterCommandModule.Builder putAllParsers(java.util.Map<java.lang.String,? extends SMFFilterCommandParserType> entries)
Put all mappings from the specified map as entries toparsersmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the parsers map- Returns:
thisbuilder for use in a chained invocation
-
build
public SMFFilterCommandModule build()
Builds a newSMFFilterCommandModule.- Returns:
- An immutable instance of SMFFilterCommandModule
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
-