Package io.thestencil.staticontent.api
Class ImmutableMarkdown
- java.lang.Object
-
- io.thestencil.staticontent.api.ImmutableMarkdown
-
- All Implemented Interfaces:
StaticContentClient.Markdown
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableMarkdown extends Object implements StaticContentClient.Markdown
Immutable implementation ofStaticContentClient.Markdown.Use the builder to create immutable instances:
ImmutableMarkdown.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableMarkdown.BuilderBuilds instances of typeImmutableMarkdown.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableMarkdown.Builderbuilder()Creates a builder forImmutableMarkdown.static ImmutableMarkdowncopyOf(StaticContentClient.Markdown instance)Creates an immutable copy of aStaticContentClient.Markdownvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableMarkdownthat have equal attribute values.com.google.common.collect.ImmutableList<StaticContentClient.Heading>getHeadings()com.google.common.collect.ImmutableList<StaticContentClient.ImageTag>getImages()StringgetLocale()StringgetPath()StringgetValue()inthashCode()Computes a hash code from attributes:locale,path,value,headings,images.StringtoString()Prints the immutable valueMarkdownwith attribute values.ImmutableMarkdownwithHeadings(StaticContentClient.Heading... elements)Copy the current immutable object with elements that replace the content ofheadings.ImmutableMarkdownwithHeadings(Iterable<? extends StaticContentClient.Heading> elements)Copy the current immutable object with elements that replace the content ofheadings.ImmutableMarkdownwithImages(StaticContentClient.ImageTag... elements)Copy the current immutable object with elements that replace the content ofimages.ImmutableMarkdownwithImages(Iterable<? extends StaticContentClient.ImageTag> elements)Copy the current immutable object with elements that replace the content ofimages.ImmutableMarkdownwithLocale(String value)Copy the current immutable object by setting a value for thelocaleattribute.ImmutableMarkdownwithPath(String value)Copy the current immutable object by setting a value for thepathattribute.ImmutableMarkdownwithValue(String value)Copy the current immutable object by setting a value for thevalueattribute.
-
-
-
Method Detail
-
getLocale
public String getLocale()
- Specified by:
getLocalein interfaceStaticContentClient.Markdown- Returns:
- The value of the
localeattribute
-
getPath
public String getPath()
- Specified by:
getPathin interfaceStaticContentClient.Markdown- Returns:
- The value of the
pathattribute
-
getValue
public String getValue()
- Specified by:
getValuein interfaceStaticContentClient.Markdown- Returns:
- The value of the
valueattribute
-
getHeadings
public com.google.common.collect.ImmutableList<StaticContentClient.Heading> getHeadings()
- Specified by:
getHeadingsin interfaceStaticContentClient.Markdown- Returns:
- The value of the
headingsattribute
-
getImages
public com.google.common.collect.ImmutableList<StaticContentClient.ImageTag> getImages()
- Specified by:
getImagesin interfaceStaticContentClient.Markdown- Returns:
- The value of the
imagesattribute
-
withLocale
public final ImmutableMarkdown withLocale(String value)
Copy the current immutable object by setting a value for thelocaleattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for locale- Returns:
- A modified copy of the
thisobject
-
withPath
public final ImmutableMarkdown withPath(String value)
Copy the current immutable object by setting a value for thepathattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for path- Returns:
- A modified copy of the
thisobject
-
withValue
public final ImmutableMarkdown withValue(String value)
Copy the current immutable object by setting a value for thevalueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- Returns:
- A modified copy of the
thisobject
-
withHeadings
public final ImmutableMarkdown withHeadings(StaticContentClient.Heading... elements)
Copy the current immutable object with elements that replace the content ofheadings.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withHeadings
public final ImmutableMarkdown withHeadings(Iterable<? extends StaticContentClient.Heading> elements)
Copy the current immutable object with elements that replace the content ofheadings. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of headings elements to set- Returns:
- A modified copy of
thisobject
-
withImages
public final ImmutableMarkdown withImages(StaticContentClient.ImageTag... elements)
Copy the current immutable object with elements that replace the content ofimages.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withImages
public final ImmutableMarkdown withImages(Iterable<? extends StaticContentClient.ImageTag> elements)
Copy the current immutable object with elements that replace the content ofimages. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of images elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableMarkdownthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:locale,path,value,headings,images.
-
toString
public String toString()
Prints the immutable valueMarkdownwith attribute values.
-
copyOf
public static ImmutableMarkdown copyOf(StaticContentClient.Markdown instance)
Creates an immutable copy of aStaticContentClient.Markdownvalue. 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 forImmutableMarkdown.ImmutableMarkdown.builder() .locale(String) // requiredlocale.path(String) // requiredpath.value(String) // requiredvalue.addHeadings|addAllHeadings(io.thestencil.staticontent.api.StaticContentClient.Heading) //headingselements .addImages|addAllImages(io.thestencil.staticontent.api.StaticContentClient.ImageTag) //imageselements .build();- Returns:
- A new ImmutableMarkdown builder
-
-