Class Link
java.lang.Object
com.hubspot.slack.client.models.events.links.Link
- All Implemented Interfaces:
LinkIF
@Generated(from="LinkIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class Link
extends Object
implements LinkIF
Immutable implementation of
LinkIF.
Use the builder to create immutable instances:
Link.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Link.Builderbuilder()Creates a builder forLink.static LinkCreates an immutable copy of aLinkIFvalue.booleanThis instance is equal to all instances ofLinkthat have equal attribute values.getUrl()inthashCode()Computes a hash code from attributes:domain,url.toString()Prints the immutable valueLinkwith attribute values.final LinkwithDomain(String value) Copy the current immutable object by setting a value for thedomainattribute.final LinkCopy the current immutable object by setting a value for theurlattribute.
-
Method Details
-
getDomain
-
getUrl
-
withDomain
Copy the current immutable object by setting a value for thedomainattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for domain- Returns:
- A modified copy or the
thisobject
-
withUrl
Copy the current immutable object by setting a value for theurlattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for url- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofLinkthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:domain,url. -
toString
Prints the immutable valueLinkwith attribute values. -
copyOf
Creates an immutable copy of aLinkIFvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Link instance
-
builder
Creates a builder forLink.Link.builder() .setDomain(String) // requireddomain.setUrl(String) // requiredurl.build();- Returns:
- A new Link builder
-