@NotThreadSafe public static final class StateBlock.Builder extends Object
StateBlock.
Initialize attributes and then invoke the build() 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.
| Modifier and Type | Method and Description |
|---|---|
StateBlock |
build()
Builds a new
StateBlock. |
StateBlock.Builder |
from(StateBlockIF instance)
Fill a builder with attribute values from the provided
StateBlockIF instance. |
StateBlock.Builder |
putActions(Map.Entry<String,? extends StateAction> entry)
Put one entry to the
actions map. |
StateBlock.Builder |
putActions(String key,
StateAction value)
Put one entry to the
actions map. |
StateBlock.Builder |
putAllActions(Map<String,? extends StateAction> actions)
Put all mappings from the specified map as entries to
actions map. |
StateBlock.Builder |
setActions(Map<String,? extends StateAction> actions)
Sets or replaces all mappings from the specified map as entries for the
actions map. |
public final StateBlock.Builder from(StateBlockIF instance)
StateBlockIF 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.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final StateBlock.Builder putActions(String key, StateAction value)
actions map.key - The key in the actions mapvalue - The associated value in the actions mapthis builder for use in a chained invocationpublic final StateBlock.Builder putActions(Map.Entry<String,? extends StateAction> entry)
actions map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final StateBlock.Builder setActions(Map<String,? extends StateAction> actions)
actions map. Nulls are not permittedactions - The entries that will be added to the actions mapthis builder for use in a chained invocationpublic final StateBlock.Builder putAllActions(Map<String,? extends StateAction> actions)
actions map. Nulls are not permittedactions - The entries that will be added to the actions mapthis builder for use in a chained invocationpublic StateBlock build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
StateBlock.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2020. All rights reserved.