@NotThreadSafe public static final class StateAction.Builder extends Object
StateAction.
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 |
|---|---|
StateAction |
build()
Builds a new
StateAction. |
StateAction.Builder |
from(StateActionIF instance)
Fill a builder with attribute values from the provided
StateActionIF instance. |
StateAction.Builder |
putActionValues(Map.Entry<String,? extends StateActionValue> entry)
Put one entry to the
actionValues map. |
StateAction.Builder |
putActionValues(String key,
StateActionValue value)
Put one entry to the
actionValues map. |
StateAction.Builder |
putAllActionValues(Map<String,? extends StateActionValue> actionValues)
Put all mappings from the specified map as entries to
actionValues map. |
StateAction.Builder |
setActionValues(Map<String,? extends StateActionValue> actionValues)
Sets or replaces all mappings from the specified map as entries for the
actionValues map. |
public final StateAction.Builder from(StateActionIF instance)
StateActionIF 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 StateAction.Builder putActionValues(String key, StateActionValue value)
actionValues map.key - The key in the actionValues mapvalue - The associated value in the actionValues mapthis builder for use in a chained invocationpublic final StateAction.Builder putActionValues(Map.Entry<String,? extends StateActionValue> entry)
actionValues map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final StateAction.Builder setActionValues(Map<String,? extends StateActionValue> actionValues)
actionValues map. Nulls are not permittedactionValues - The entries that will be added to the actionValues mapthis builder for use in a chained invocationpublic final StateAction.Builder putAllActionValues(Map<String,? extends StateActionValue> actionValues)
actionValues map. Nulls are not permittedactionValues - The entries that will be added to the actionValues mapthis builder for use in a chained invocationpublic StateAction build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
StateAction.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2020. All rights reserved.