@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","Template"}) @Immutable 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. |
Optional<String> |
getRegExp() |
String |
getType() |
int |
hashCode()
Computes a hash code from attributes:
type, regExp. |
String |
toString()
Prints the immutable value
Template with attribute values. |
ImmutableTemplate |
withRegExp(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
regExp attribute. |
ImmutableTemplate |
withRegExp(String value)
Copy the current immutable object by setting a present value for the optional
regExp attribute. |
ImmutableTemplate |
withType(String value)
Copy the current immutable object by setting a value for the
type attribute. |
public String getType()
public final ImmutableTemplate withType(String value)
type attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for typethis objectpublic final ImmutableTemplate withRegExp(String value)
regExp attribute.value - The value for regExpthis objectpublic final ImmutableTemplate withRegExp(Optional<String> optional)
regExp attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for regExpthis objectpublic boolean equals(@Nullable Object another)
ImmutableTemplate that have equal attribute values.public int hashCode()
type, regExp.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.Copyright © 2018. All rights reserved.