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.Object
Builds instances of typeSMFFilterCommandModule
. Initialize attributes and then invoke thebuild()
method to create an immutable instance.Builder
is 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 SMFFilterCommandModule
build()
Builds a newSMFFilterCommandModule
.SMFFilterCommandModule.Builder
from(SMFFilterCommandModuleType instance)
Fill a builder with attribute values from the providedSMFFilterCommandModuleType
instance.SMFFilterCommandModule.Builder
putAllParsers(java.util.Map<java.lang.String,? extends SMFFilterCommandParserType> entries)
Put all mappings from the specified map as entries toparsers
map.SMFFilterCommandModule.Builder
putParsers(java.lang.String key, SMFFilterCommandParserType value)
Put one entry to theparsers
map.SMFFilterCommandModule.Builder
putParsers(java.util.Map.Entry<java.lang.String,? extends SMFFilterCommandParserType> entry)
Put one entry to theparsers
map.SMFFilterCommandModule.Builder
setName(java.lang.String name)
Initializes the value for thename
attribute.SMFFilterCommandModule.Builder
setParsers(java.util.Map<java.lang.String,? extends SMFFilterCommandParserType> entries)
Sets or replaces all mappings from the specified map as entries for theparsers
map.
-
-
-
Method Detail
-
from
public final SMFFilterCommandModule.Builder from(SMFFilterCommandModuleType instance)
Fill a builder with attribute values from the providedSMFFilterCommandModuleType
instance. 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:
this
builder for use in a chained invocation
-
setName
public final SMFFilterCommandModule.Builder setName(java.lang.String name)
Initializes the value for thename
attribute.- Parameters:
name
- The value for name- Returns:
this
builder for use in a chained invocation
-
putParsers
public final SMFFilterCommandModule.Builder putParsers(java.lang.String key, SMFFilterCommandParserType value)
Put one entry to theparsers
map.- Parameters:
key
- The key in the parsers mapvalue
- The associated value in the parsers map- Returns:
this
builder 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 theparsers
map. Nulls are not permitted- Parameters:
entry
- The key and value entry- Returns:
this
builder 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 theparsers
map. Nulls are not permitted- Parameters:
entries
- The entries that will be added to the parsers map- Returns:
this
builder 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 toparsers
map. Nulls are not permitted- Parameters:
entries
- The entries that will be added to the parsers map- Returns:
this
builder 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
-
-