Class Link

    • Constructor Detail

      • Link

        public Link()
      • Link

        public Link​(Link link)
    • Method Detail

      • copy

        public Link copy()
        Specified by:
        copy in interface Copyable<Link>
        Returns:
        a deep copy of this instance
      • componentId

        public Link componentId​(String componentId)
        Sets the component ID of the link.
        Parameters:
        componentId - the component ID
        Returns:
        the link
      • path

        public Link path​(String path)
        Sets the path of the link.
        Parameters:
        path - the path
        Returns:
        the link
      • param

        public Link param​(String name,
                          Object value)
        Adds a parameter with the given name and value. The value may be a serializable object in which case the request parameter value will become serialized JSON.
        Parameters:
        name - the parameter name
        value - the parameter value
        Returns:
        the link
      • params

        public Link params​(Map<String,​Object> paramsToAdd)
        Adds a map of parameters. The value may be a serializable object in which case the request parameter value will become serialized JSON.
        Parameters:
        paramsToAdd - the params to add
        Returns:
        the link
      • self

        protected Link self()
      • getPath

        public String getPath()

        Alternative to componentId to provide a static path as a link, e.g. "/products/:id". This will take second priority to componentId if you need to statically reference a path.

        This supports any valid URL path that https://github.com/pillarjs/path-to-regexp/tree/v1.7.0 understands, e.g. "/products", "/products/:id", and "/categories/:id?" are all valid URL paths. Must start with a slash, and optionally may include any path parameters as necessary.

      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object