Java 8 has reached end of support
and will be
deprecated
on January 31, 2026. After deprecation, you won't be able to deploy Java 8
applications, even if your organization previously used an organization policy to
re-enable deployments of legacy runtimes. Your existing Java
8 applications will continue to run and receive traffic after their
deprecation date. We recommend that
you
migrate to the latest supported version of Java.
Link (Google App Engine API for Java)
Stay organized with collections
Save and categorize content based on your preferences.
- java.lang.Object
-
- com.google.appengine.api.datastore.Link
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<Link>
public final class Link
extends java.lang.Object
implements java.io.Serializable, java.lang.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.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors
Constructor and Description |
Link(java.lang.String value)
Constructs a new Link object with the specified value.
|
-
Method Summary
-
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
-
compareTo
public int compareTo(Link l)
- Specified by:
compareTo
in interface java.lang.Comparable<Link>
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 2025-06-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eLink\u003c/code\u003e class represents a URL with a maximum length of 2083 characters, longer than a typical \u003ccode\u003eText\u003c/code\u003e value.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003eLink\u003c/code\u003e object is immutable once created, as indicated by the constructor which specifies that it cannot be modified.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eLink\u003c/code\u003e objects can be compared to each other using the \u003ccode\u003ecompareTo\u003c/code\u003e method, and two \u003ccode\u003eLink\u003c/code\u003e objects are considered equal if their content strings are identical, verified using the \u003ccode\u003eequals\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetValue\u003c/code\u003e method retrieves the URL string stored within the \u003ccode\u003eLink\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003etoString\u003c/code\u003e method returns the entire URL text of the \u003ccode\u003eLink\u003c/code\u003e, while the \u003ccode\u003ehashCode\u003c/code\u003e method provides a hash code value for the object.\u003c/p\u003e\n"]]],[],null,["# Link (Google App Engine API for Java)\n\ncom.google.appengine.api.datastore\n\nClass Link\n----------\n\n- java.lang.Object\n-\n - com.google.appengine.api.datastore.Link\n\n-\n\n All Implemented Interfaces:\n : java.io.Serializable, java.lang.Comparable\\\u003c[Link](../../../../../com/google/appengine/api/datastore/Link.html \"class in com.google.appengine.api.datastore\")\\\u003e\n\n *** ** * ** ***\n\n \u003cbr /\u003e\n\n ```\n public final class Link\n extends java.lang.Object\n implements java.io.Serializable, java.lang.Comparable\u003cLink\u003e\n ``` \n A `Link` is a URL of limited length.\n\n In addition to adding the meaning of `URL` onto a String, a `Link` can also be\n longer than a Text value, with a limit of 2083 characters.\n\n See Also:\n: [Serialized Form](../../../../../serialized-form.html#com.google.appengine.api.datastore.Link) \n-\n -\n\n ### Field Summary\n\n \u003c!-- --\u003e\n\n -\n\n ### Constructor Summary\n\n \u003c!-- --\u003e\n\n -\n\n ### Method Summary\n\n -\n\n ### Methods inherited from class java.lang.Object\n\n`getClass, notify, notifyAll, wait, wait, wait` \n-\n -\n\n ### Field Detail\n\n\n -\n\n #### serialVersionUID\n\n ```\n public static final long serialVersionUID\n ```\n\n See Also:\n : [Constant Field Values](../../../../../constant-values.html#com.google.appengine.api.datastore.Link.serialVersionUID)\n\n \u003c!-- --\u003e\n\n -\n\n ### Constructor Detail\n\n\n -\n\n #### Link\n\n ```\n public Link(java.lang.String value)\n ``` \n Constructs a new `Link` object with the specified value. This object cannot be modified after construction.\n\n \u003c!-- --\u003e\n\n -\n\n ### Method Detail\n\n\n -\n\n #### getValue\n\n ```\n public java.lang.String getValue()\n ``` \n Returns the value of this `Link`.\n\n\n -\n\n #### hashCode\n\n ```\n public int hashCode()\n ```\n\n Overrides:\n : `hashCode` in class `java.lang.Object`\n\n\n -\n\n #### equals\n\n ```\n public boolean equals(java.lang.Object object)\n ``` \n Two `Link` objects are considered equal if their content strings match exactly.\n\n Overrides:\n : `equals` in class `java.lang.Object`\n\n\n -\n\n #### toString\n\n ```\n public java.lang.String toString()\n ``` \n Returns the entire text of this `Link`.\n\n Overrides:\n : `toString` in class `java.lang.Object`\n\n\n -\n\n #### compareTo\n\n ```\n public int compareTo(Link l)\n ```\n\n Specified by:\n : `compareTo` in interface `java.lang.Comparable\u003c`[Link](../../../../../com/google/appengine/api/datastore/Link.html \"class in com.google.appengine.api.datastore\")`\u003e`"]]