Class ImmutableMarkdowns

  • All Implemented Interfaces:
    Markdowns

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

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

    • Method Detail

      • getValues

        public com.google.common.collect.ImmutableList<Markdowns.Markdown> getValues()
        Specified by:
        getValues in interface Markdowns
        Returns:
        The value of the values attribute
      • getLocales

        public com.google.common.collect.ImmutableList<String> getLocales()
        Specified by:
        getLocales in interface Markdowns
        Returns:
        The value of the locales attribute
      • withValues

        public final ImmutableMarkdowns withValues​(Markdowns.Markdown... elements)
        Copy the current immutable object with elements that replace the content of values.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withValues

        public final ImmutableMarkdowns withValues​(Iterable<? extends Markdowns.Markdown> elements)
        Copy the current immutable object with elements that replace the content of values. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of values elements to set
        Returns:
        A modified copy of this object
      • withImages

        public final ImmutableMarkdowns withImages​(Markdowns.ImageResource... elements)
        Copy the current immutable object with elements that replace the content of images.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withImages

        public final ImmutableMarkdowns withImages​(Iterable<? extends Markdowns.ImageResource> elements)
        Copy the current immutable object with elements that replace the content of images. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of images elements to set
        Returns:
        A modified copy of this object
      • withLinks

        public final ImmutableMarkdowns withLinks​(Markdowns.LinkResource... elements)
        Copy the current immutable object with elements that replace the content of links.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withLinks

        public final ImmutableMarkdowns withLinks​(Iterable<? extends Markdowns.LinkResource> elements)
        Copy the current immutable object with elements that replace the content of links. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of links elements to set
        Returns:
        A modified copy of this object
      • withLocales

        public final ImmutableMarkdowns withLocales​(String... elements)
        Copy the current immutable object with elements that replace the content of locales.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withLocales

        public final ImmutableMarkdowns withLocales​(Iterable<String> elements)
        Copy the current immutable object with elements that replace the content of locales. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of locales elements to set
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableMarkdowns 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: values, images, links, locales.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableMarkdowns copyOf​(Markdowns instance)
        Creates an immutable copy of a Markdowns 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 Markdowns instance
      • builder

        public static ImmutableMarkdowns.Builder builder()
        Creates a builder for ImmutableMarkdowns.
         ImmutableMarkdowns.builder()
            .addValues|addAllValues(io.thestencil.client.api.Markdowns.Markdown) // values elements
            .addImages|addAllImages(io.thestencil.client.api.Markdowns.ImageResource) // images elements
            .addLinks|addAllLinks(io.thestencil.client.api.Markdowns.LinkResource) // links elements
            .addLocales|addAllLocales(String) // locales elements
            .build();
         
        Returns:
        A new ImmutableMarkdowns builder