Class ImmutableTopicData

    • Method Detail

      • withPath

        public final ImmutableTopicData 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
      • withLocale

        public final ImmutableTopicData 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
      • withValue

        public final ImmutableTopicData 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 ImmutableTopicData 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 ImmutableTopicData 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 ImmutableTopicData 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 ImmutableTopicData 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 ImmutableTopicData 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: path, locale, value, headings, images.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

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

        public static ImmutableTopicData.Builder builder()
        Creates a builder for ImmutableTopicData.
         ImmutableTopicData.builder()
            .path(String) // required path
            .locale(String) // required locale
            .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 ImmutableTopicData builder