Package com.helixframework.api.contract
Class HalLinks
java.lang.Object
com.helixframework.api.contract.HalLinks
Represents a collection of HAL (Hypertext Application Language) links.
Each entry maps a link relation (rel) to a
HalLink instance.
This container serializes to the canonical "_links" JSON structure in HAL.
Example JSON:
{
"_links": {
"self": { "href": "/orders/123" },
"update": { "href": "/orders/123", "meta": { "method": "PUT" } }
}
}-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic HalLinks.Builderbuilder()Creates a new empty builder for constructingHalLinks.static HalLinks.BuilderCreates a new builder initialized with the links of the given instance.booleangetLinks()Returns the internal map of rel → HalLink entries.inthashCode()static HalLinksCreates a newHalLinksinstance with the given links.static HalLinksConvenience factory for a single self link.toString()
-
Method Details
-
builder
Creates a new empty builder for constructingHalLinks.- Returns:
- a new Builder instance
-
builder
Creates a new builder initialized with the links of the given instance.- Parameters:
links- links to copy from- Returns:
- a new Builder instance
-
of
Creates a newHalLinksinstance with the given links.- Parameters:
links- links to include- Returns:
- a new HalLinks instance
-
self
Convenience factory for a single self link. -
getLinks
Returns the internal map of rel → HalLink entries.- Returns:
- Unmodifiable map of links
-
equals
-
hashCode
public int hashCode() -
toString
-