Class DefaultLink

  • All Implemented Interfaces:
    Link, Link.Builder

    @Introspected
    public class DefaultLink
    extends java.lang.Object
    implements Link, Link.Builder
    Default implementation of Link.
    Since:
    1.1
    • Constructor Detail

      • DefaultLink

        protected DefaultLink​(java.lang.String uri)
        Parameters:
        uri - The URI
    • Method Detail

      • getHref

        public java.lang.String getHref()
        Specified by:
        getHref in interface Link
        Returns:
        The URI to template to
      • isTemplated

        public boolean isTemplated()
        Specified by:
        isTemplated in interface Link
        Returns:
        Whether the URI is templated
      • getType

        public java.util.Optional<MediaType> getType()
        Specified by:
        getType in interface Link
        Returns:
        The type of the URI
      • getDeprecation

        public java.util.Optional<java.lang.String> getDeprecation()
        Specified by:
        getDeprecation in interface Link
        Returns:
        The deprecation URI
      • getProfile

        public java.util.Optional<java.lang.String> getProfile()
        Specified by:
        getProfile in interface Link
        Returns:
        The profile URI
      • getName

        public java.util.Optional<java.lang.String> getName()
        Specified by:
        getName in interface Link
        Returns:
        The name of the link
      • getTitle

        public java.util.Optional<java.lang.String> getTitle()
        Specified by:
        getTitle in interface Link
        Returns:
        The title of the link
      • getHreflang

        public java.util.Optional<java.lang.String> getHreflang()
        Specified by:
        getHreflang in interface Link
        Returns:
        The language of the link