Class ImmutableMarkdown

    • Method Detail

      • withLocale

        public final ImmutableMarkdown withLocale​(String value)
        Copy the current immutable object by setting a value for the locale attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for locale
        Returns:
        A modified copy of the this object
      • withPath

        public final ImmutableMarkdown withPath​(String value)
        Copy the current immutable object by setting a value for the path attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for path
        Returns:
        A modified copy of the this object
      • withValue

        public final ImmutableMarkdown withValue​(String value)
        Copy the current immutable object by setting a value for the value attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for value
        Returns:
        A modified copy of the this object
      • withHeadings

        public final ImmutableMarkdown withHeadings​(StaticContentClient.Heading... elements)
        Copy the current immutable object with elements that replace the content of headings.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withHeadings

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

        public final ImmutableMarkdown withImages​(StaticContentClient.ImageTag... 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 ImmutableMarkdown withImages​(Iterable<? extends StaticContentClient.ImageTag> 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
      • equals

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

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

        public static ImmutableMarkdown copyOf​(StaticContentClient.Markdown instance)
        Creates an immutable copy of a StaticContentClient.Markdown 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 Markdown instance
      • builder

        public static ImmutableMarkdown.Builder builder()
        Creates a builder for ImmutableMarkdown.
         ImmutableMarkdown.builder()
            .locale(String) // required locale
            .path(String) // required path
            .value(String) // required value
            .addHeadings|addAllHeadings(io.thestencil.staticontent.api.StaticContentClient.Heading) // headings elements
            .addImages|addAllImages(io.thestencil.staticontent.api.StaticContentClient.ImageTag) // images elements
            .build();
         
        Returns:
        A new ImmutableMarkdown builder