Class ImmutableCommentLinks

  • All Implemented Interfaces:
    Links, CommentLinks

    @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutableCommentLinks
    extends Object
    implements CommentLinks
    Immutable implementation of CommentLinks.

    Use the builder to create immutable instances: ImmutableCommentLinks.builder().

    • Method Detail

      • self

        @Nullable
        public Links.Href<URI> self()
        Link to this entity in the API.
        Specified by:
        self in interface Links
        Returns:
        The link to the API of this entity
      • html

        @Nullable
        public Links.Href<URI> html()
        Link to the HTML representaion of this item.
        Specified by:
        html in interface Links
        Returns:
        The link to the HTML representation of this entity
      • withSelf

        public final ImmutableCommentLinks withSelf​(@Nullable
                                                    Links.Href<URI> value)
        Copy the current immutable object by setting a value for the self attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for self (can be null)
        Returns:
        A modified copy of the this object
      • withHtml

        public final ImmutableCommentLinks withHtml​(@Nullable
                                                    Links.Href<URI> value)
        Copy the current immutable object by setting a value for the html attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for html (can be null)
        Returns:
        A modified copy of the this object
      • withPullRequest

        public final ImmutableCommentLinks withPullRequest​(@Nullable
                                                           Links.Href<URI> value)
        Copy the current immutable object by setting a value for the pullRequest attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for pullRequest (can be null)
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableCommentLinks that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: self, html, pullRequest.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Prints the immutable value CommentLinks with attribute values.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the value
      • copyOf

        public static ImmutableCommentLinks copyOf​(CommentLinks instance)
        Creates an immutable copy of a CommentLinks value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable CommentLinks instance
      • builder

        public static ImmutableCommentLinks.Builder builder()
        Creates a builder for ImmutableCommentLinks.
         ImmutableCommentLinks.builder()
            .self(com.spotify.github.Links.Href&lt;java.net.URI&gt; | null) // nullable self
            .html(com.spotify.github.Links.Href&lt;java.net.URI&gt; | null) // nullable html
            .pullRequest(com.spotify.github.Links.Href&lt;java.net.URI&gt; | null) // nullable pullRequest
            .build();
         
        Returns:
        A new ImmutableCommentLinks builder