Class Link (5.0.3)
Stay organized with collections
Save and categorize content based on your preferences.
public final class Link implements Serializable, Comparable<Link>
A Link is a URL of limited length.
In addition to adding the meaning of URL onto a String, a Link can also be
longer than a Text value, with a limit of 2083 characters.
Static Fields
serialVersionUID
public static final long serialVersionUID
| Field Value |
| Type |
Description |
long |
|
Constructors
Link(String value)
public Link(String value)
Constructs a new Link object with the specified value. This object cannot be modified
after construction.
| Parameter |
| Name |
Description |
value |
String
|
Methods
compareTo(Link l)
public int compareTo(Link l)
| Parameter |
| Name |
Description |
l |
Link
|
| Returns |
| Type |
Description |
int |
|
equals(@Nullable Object object)
public boolean equals(@Nullable Object object)
Two Link objects are considered equal if their content strings match exactly.
Overrides
getValue()
Returns the value of this Link.
| Returns |
| Type |
Description |
String |
|
hashCode()
| Returns |
| Type |
Description |
int |
|
Overrides
toString()
Returns the entire text of this Link.
| Returns |
| Type |
Description |
String |
|
Overrides
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-06-03 UTC.
[null,null,["Last updated 2026-06-03 UTC."],[],[]]