public static final class ImmutableRecordings.Builder extends Object
ImmutableRecordings.
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 |
|---|---|
ImmutableRecordings.Builder |
addAllLines(Iterable<? extends HasLine> elements)
Adds elements to
lines list. |
ImmutableRecordings.Builder |
addAllLinesOfCode(Iterable<String> elements)
Adds elements to
linesOfCode list. |
ImmutableRecordings.Builder |
addLines(HasLine... elements)
Adds elements to
lines list. |
ImmutableRecordings.Builder |
addLines(HasLine element)
Adds one element to
lines list. |
ImmutableRecordings.Builder |
addLinesOfCode(String... elements)
Adds elements to
linesOfCode list. |
ImmutableRecordings.Builder |
addLinesOfCode(String element)
Adds one element to
linesOfCode list. |
ImmutableRecordings |
build()
Builds a new
ImmutableRecordings. |
ImmutableRecordings.Builder |
classes(Map<String,? extends String> entries)
Sets or replaces all mappings from the specified map as entries for the
classes map. |
ImmutableRecordings.Builder |
from(Recordings instance)
Fill a builder with attribute values from the provided
Recordings instance. |
ImmutableRecordings.Builder |
lines(Iterable<? extends HasLine> elements)
Sets or replaces all elements for
lines list. |
ImmutableRecordings.Builder |
linesOfCode(Iterable<String> elements)
Sets or replaces all elements for
linesOfCode list. |
ImmutableRecordings.Builder |
methodsCalled(Map<String,? extends CalledMethod> entries)
Sets or replaces all mappings from the specified map as entries for the
methodsCalled map. |
ImmutableRecordings.Builder |
output(Map<String,? extends String> entries)
Sets or replaces all mappings from the specified map as entries for the
output map. |
ImmutableRecordings.Builder |
putAllClasses(Map<String,? extends String> entries)
Put all mappings from the specified map as entries to
classes map. |
ImmutableRecordings.Builder |
putAllMethodsCalled(Map<String,? extends CalledMethod> entries)
Put all mappings from the specified map as entries to
methodsCalled map. |
ImmutableRecordings.Builder |
putAllOutput(Map<String,? extends String> entries)
Put all mappings from the specified map as entries to
output map. |
ImmutableRecordings.Builder |
putAllResources(Map<String,? extends String> entries)
Put all mappings from the specified map as entries to
resources map. |
ImmutableRecordings.Builder |
putClasses(Map.Entry<String,? extends String> entry)
Put one entry to the
classes map. |
ImmutableRecordings.Builder |
putClasses(String key,
String value)
Put one entry to the
classes map. |
ImmutableRecordings.Builder |
putMethodsCalled(Map.Entry<String,? extends CalledMethod> entry)
Put one entry to the
methodsCalled map. |
ImmutableRecordings.Builder |
putMethodsCalled(String key,
CalledMethod value)
Put one entry to the
methodsCalled map. |
ImmutableRecordings.Builder |
putOutput(Map.Entry<String,? extends String> entry)
Put one entry to the
output map. |
ImmutableRecordings.Builder |
putOutput(String key,
String value)
Put one entry to the
output map. |
ImmutableRecordings.Builder |
putResources(Map.Entry<String,? extends String> entry)
Put one entry to the
resources map. |
ImmutableRecordings.Builder |
putResources(String key,
String value)
Put one entry to the
resources map. |
ImmutableRecordings.Builder |
replacementNotFoundFallback(BiFunction<String,Set<String>,String> replacementNotFoundFallback)
Initializes the optional value
replacementNotFoundFallback to replacementNotFoundFallback. |
ImmutableRecordings.Builder |
replacementNotFoundFallback(Optional<? extends BiFunction<String,Set<String>,String>> replacementNotFoundFallback)
Initializes the optional value
replacementNotFoundFallback to replacementNotFoundFallback. |
ImmutableRecordings.Builder |
resources(Map<String,? extends String> entries)
Sets or replaces all mappings from the specified map as entries for the
resources map. |
ImmutableRecordings.Builder |
templateReference(TemplateReference templateReference)
Initializes the value for the
templateReference attribute. |
public final ImmutableRecordings.Builder from(Recordings instance)
Recordings 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 ImmutableRecordings.Builder templateReference(TemplateReference templateReference)
templateReference attribute.templateReference - The value for templateReferencethis builder for use in a chained invocationpublic final ImmutableRecordings.Builder addLinesOfCode(String element)
linesOfCode list.element - A linesOfCode elementthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder addLinesOfCode(String... elements)
linesOfCode list.elements - An array of linesOfCode elementsthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder linesOfCode(Iterable<String> elements)
linesOfCode list.elements - An iterable of linesOfCode elementsthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder addAllLinesOfCode(Iterable<String> elements)
linesOfCode list.elements - An iterable of linesOfCode elementsthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder addLines(HasLine element)
lines list.element - A lines elementthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder addLines(HasLine... elements)
lines list.elements - An array of lines elementsthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder lines(Iterable<? extends HasLine> elements)
lines list.elements - An iterable of lines elementsthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder addAllLines(Iterable<? extends HasLine> elements)
lines list.elements - An iterable of lines elementsthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder putMethodsCalled(String key, CalledMethod value)
methodsCalled map.key - The key in the methodsCalled mapvalue - The associated value in the methodsCalled mapthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder putMethodsCalled(Map.Entry<String,? extends CalledMethod> entry)
methodsCalled map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final ImmutableRecordings.Builder methodsCalled(Map<String,? extends CalledMethod> entries)
methodsCalled map. Nulls are not permittedentries - The entries that will be added to the methodsCalled mapthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder putAllMethodsCalled(Map<String,? extends CalledMethod> entries)
methodsCalled map. Nulls are not permittedentries - The entries that will be added to the methodsCalled mapthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder putClasses(String key, String value)
classes map.key - The key in the classes mapvalue - The associated value in the classes mapthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder putClasses(Map.Entry<String,? extends String> entry)
classes map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final ImmutableRecordings.Builder classes(Map<String,? extends String> entries)
classes map. Nulls are not permittedentries - The entries that will be added to the classes mapthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder putAllClasses(Map<String,? extends String> entries)
classes map. Nulls are not permittedentries - The entries that will be added to the classes mapthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder putResources(String key, String value)
resources map.key - The key in the resources mapvalue - The associated value in the resources mapthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder putResources(Map.Entry<String,? extends String> entry)
resources map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final ImmutableRecordings.Builder resources(Map<String,? extends String> entries)
resources map. Nulls are not permittedentries - The entries that will be added to the resources mapthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder putAllResources(Map<String,? extends String> entries)
resources map. Nulls are not permittedentries - The entries that will be added to the resources mapthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder putOutput(String key, String value)
output map.key - The key in the output mapvalue - The associated value in the output mapthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder putOutput(Map.Entry<String,? extends String> entry)
output map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final ImmutableRecordings.Builder output(Map<String,? extends String> entries)
output map. Nulls are not permittedentries - The entries that will be added to the output mapthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder putAllOutput(Map<String,? extends String> entries)
output map. Nulls are not permittedentries - The entries that will be added to the output mapthis builder for use in a chained invocationpublic final ImmutableRecordings.Builder replacementNotFoundFallback(BiFunction<String,Set<String>,String> replacementNotFoundFallback)
replacementNotFoundFallback to replacementNotFoundFallback.replacementNotFoundFallback - The value for replacementNotFoundFallbackthis builder for chained invocationpublic final ImmutableRecordings.Builder replacementNotFoundFallback(Optional<? extends BiFunction<String,Set<String>,String>> replacementNotFoundFallback)
replacementNotFoundFallback to replacementNotFoundFallback.replacementNotFoundFallback - The value for replacementNotFoundFallbackthis builder for use in a chained invocationpublic ImmutableRecordings build()
ImmutableRecordings.IllegalStateException - if any required attributes are missingCopyright © 2022. All rights reserved.