Class ImmutableSiteVisitorOutput
- java.lang.Object
-
- io.thestencil.client.spi.staticontent.visitors.ImmutableSiteVisitorOutput
-
- All Implemented Interfaces:
SiteVisitor.SiteVisitorOutput
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableSiteVisitorOutput extends Object implements SiteVisitor.SiteVisitorOutput
Immutable implementation ofSiteVisitor.SiteVisitorOutput.Use the builder to create immutable instances:
ImmutableSiteVisitorOutput.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableSiteVisitorOutput.BuilderBuilds instances of typeImmutableSiteVisitorOutput.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableSiteVisitorOutput.Builderbuilder()Creates a builder forImmutableSiteVisitorOutput.static ImmutableSiteVisitorOutputcopyOf(SiteVisitor.SiteVisitorOutput instance)Creates an immutable copy of aSiteVisitor.SiteVisitorOutputvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableSiteVisitorOutputthat have equal attribute values.com.google.common.collect.ImmutableList<SiteVisitor.Message>getMessage()com.google.common.collect.ImmutableList<MigrationBuilder.LocalizedSite>getSites()inthashCode()Computes a hash code from attributes:message,sites.StringtoString()Prints the immutable valueSiteVisitorOutputwith attribute values.ImmutableSiteVisitorOutputwithMessage(SiteVisitor.Message... elements)Copy the current immutable object with elements that replace the content ofmessage.ImmutableSiteVisitorOutputwithMessage(Iterable<? extends SiteVisitor.Message> elements)Copy the current immutable object with elements that replace the content ofmessage.ImmutableSiteVisitorOutputwithSites(MigrationBuilder.LocalizedSite... elements)Copy the current immutable object with elements that replace the content ofsites.ImmutableSiteVisitorOutputwithSites(Iterable<? extends MigrationBuilder.LocalizedSite> 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.SiteVisitorOutput- Returns:
- The value of the
messageattribute
-
getSites
public com.google.common.collect.ImmutableList<MigrationBuilder.LocalizedSite> getSites()
- Specified by:
getSitesin interfaceSiteVisitor.SiteVisitorOutput- Returns:
- The value of the
sitesattribute
-
withMessage
public final ImmutableSiteVisitorOutput 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 ImmutableSiteVisitorOutput 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 ImmutableSiteVisitorOutput withSites(MigrationBuilder.LocalizedSite... 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 ImmutableSiteVisitorOutput withSites(Iterable<? extends MigrationBuilder.LocalizedSite> 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 ofImmutableSiteVisitorOutputthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:message,sites.
-
toString
public String toString()
Prints the immutable valueSiteVisitorOutputwith attribute values.
-
copyOf
public static ImmutableSiteVisitorOutput copyOf(SiteVisitor.SiteVisitorOutput instance)
Creates an immutable copy of aSiteVisitor.SiteVisitorOutputvalue. 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 SiteVisitorOutput instance
-
builder
public static ImmutableSiteVisitorOutput.Builder builder()
Creates a builder forImmutableSiteVisitorOutput.ImmutableSiteVisitorOutput.builder() .addMessage|addAllMessage(io.thestencil.client.spi.staticontent.visitors.SiteVisitor.Message) //messageelements .addSites|addAllSites(io.thestencil.client.api.MigrationBuilder.LocalizedSite) //siteselements .build();- Returns:
- A new ImmutableSiteVisitorOutput builder
-
-