@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","LinkIF"}) @Immutable public final class Link extends Object implements LinkIF
LinkIF.
Use the builder to create immutable instances:
Link.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
Link.Builder
Builds instances of type
Link. |
| Modifier and Type | Method and Description |
|---|---|
static Link.Builder |
builder()
Creates a builder for
Link. |
static Link |
copyOf(LinkIF instance)
Creates an immutable copy of a
LinkIF value. |
boolean |
equals(Object another)
This instance is equal to all instances of
Link that have equal attribute values. |
String |
getDomain() |
String |
getUrl() |
int |
hashCode()
Computes a hash code from attributes:
domain, url. |
String |
toString()
Prints the immutable value
Link with attribute values. |
Link |
withDomain(String domain)
Copy the current immutable object by setting a value for the
domain attribute. |
Link |
withUrl(String url)
Copy the current immutable object by setting a value for the
url attribute. |
public String getDomain()
public String getUrl()
public final Link withDomain(String domain)
domain attribute.
An equals check used to prevent copying of the same value by returning this.domain - A new value for domainthis objectpublic final Link withUrl(String url)
url attribute.
An equals check used to prevent copying of the same value by returning this.url - A new value for urlthis objectpublic boolean equals(@Nullable Object another)
Link that have equal attribute values.public int hashCode()
domain, url.public String toString()
Link with attribute values.public static Link copyOf(LinkIF instance)
LinkIF 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 Link.Builder builder()
Link.Copyright © 2020. All rights reserved.