Class ImmutableSites
- java.lang.Object
-
- io.thestencil.staticontent.spi.visitor.ImmutableSites
-
- All Implemented Interfaces:
SiteVisitor.Sites
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableSites extends Object implements SiteVisitor.Sites
Immutable implementation ofSiteVisitor.Sites.Use the builder to create immutable instances:
ImmutableSites.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableSites.BuilderBuilds instances of typeImmutableSites.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableSites.Builderbuilder()Creates a builder forImmutableSites.static ImmutableSitescopyOf(SiteVisitor.Sites instance)Creates an immutable copy of aSiteVisitor.Sitesvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableSitesthat have equal attribute values.com.google.common.collect.ImmutableList<SiteVisitor.Message>getMessage()com.google.common.collect.ImmutableList<SiteContent.Site>getSites()inthashCode()Computes a hash code from attributes:message,sites.StringtoString()Prints the immutable valueSiteswith attribute values.ImmutableSiteswithMessage(SiteVisitor.Message... elements)Copy the current immutable object with elements that replace the content ofmessage.ImmutableSiteswithMessage(Iterable<? extends SiteVisitor.Message> elements)Copy the current immutable object with elements that replace the content ofmessage.ImmutableSiteswithSites(SiteContent.Site... elements)Copy the current immutable object with elements that replace the content ofsites.ImmutableSiteswithSites(Iterable<? extends SiteContent.Site> elements)Copy the current immutable object with elements that replace the content ofsites.
-
-
-
Method Detail
-
getMessage
public com.google.common.collect.ImmutableList<SiteVisitor.Message> getMessage()
- Specified by:
getMessagein interfaceSiteVisitor.Sites- Returns:
- The value of the
messageattribute
-
getSites
public com.google.common.collect.ImmutableList<SiteContent.Site> getSites()
- Specified by:
getSitesin interfaceSiteVisitor.Sites- Returns:
- The value of the
sitesattribute
-
withMessage
public final ImmutableSites withMessage(SiteVisitor.Message... elements)
Copy the current immutable object with elements that replace the content ofmessage.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withMessage
public final ImmutableSites withMessage(Iterable<? extends SiteVisitor.Message> elements)
Copy the current immutable object with elements that replace the content ofmessage. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of message elements to set- Returns:
- A modified copy of
thisobject
-
withSites
public final ImmutableSites withSites(SiteContent.Site... elements)
Copy the current immutable object with elements that replace the content ofsites.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withSites
public final ImmutableSites withSites(Iterable<? extends SiteContent.Site> elements)
Copy the current immutable object with elements that replace the content ofsites. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of sites elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableSitesthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:message,sites.
-
toString
public String toString()
Prints the immutable valueSiteswith attribute values.
-
copyOf
public static ImmutableSites copyOf(SiteVisitor.Sites instance)
Creates an immutable copy of aSiteVisitor.Sitesvalue. 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 Sites instance
-
builder
public static ImmutableSites.Builder builder()
Creates a builder forImmutableSites.ImmutableSites.builder() .addMessage|addAllMessage(io.thestencil.staticontent.spi.visitor.SiteVisitor.Message) //messageelements .addSites|addAllSites(io.thestencil.staticontent.api.SiteContent.Site) //siteselements .build();- Returns:
- A new ImmutableSites builder
-
-