@Generated(value="org.immutables.processor.ProxyProcessor") public final class ImmutableTemplate extends Template
Template.
Use the builder to create immutable instances:
ImmutableTemplate.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableTemplate.Builder
Builds instances of type
ImmutableTemplate. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableTemplate.Builder |
builder()
Creates a builder for
ImmutableTemplate. |
static ImmutableTemplate |
copyOf(Template instance)
Creates an immutable copy of a
Template value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableTemplate that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
source, pattern. |
ReplacementPattern |
pattern() |
String |
source() |
String |
toString()
Prints the immutable value
Template with attribute values. |
ImmutableTemplate |
withPattern(ReplacementPattern value)
Copy the current immutable object by setting a value for the
pattern attribute. |
ImmutableTemplate |
withSource(String value)
Copy the current immutable object by setting a value for the
source attribute. |
public String source()
public ReplacementPattern pattern()
public final ImmutableTemplate withSource(String value)
source attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for sourcethis objectpublic final ImmutableTemplate withPattern(ReplacementPattern value)
pattern attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for patternthis objectpublic boolean equals(Object another)
ImmutableTemplate that have equal attribute values.public int hashCode()
source, pattern.public String toString()
Template with attribute values.public static ImmutableTemplate copyOf(Template instance)
Template value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableTemplate.Builder builder()
ImmutableTemplate.
ImmutableTemplate.builder()
.source(String) // required source
.pattern(de.flapdoodle.testdoc.ReplacementPattern) // optional pattern
.build();
Copyright © 2023. All rights reserved.