Class ImmutableLinkData
- java.lang.Object
-
- io.thestencil.staticontent.spi.visitor.ImmutableLinkData
-
- All Implemented Interfaces:
SiteVisitor.LinkData
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableLinkData extends Object implements SiteVisitor.LinkData
Immutable implementation ofSiteVisitor.LinkData.Use the builder to create immutable instances:
ImmutableLinkData.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableLinkData.BuilderBuilds instances of typeImmutableLinkData.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableLinkData.Builderbuilder()Creates a builder forImmutableLinkData.static ImmutableLinkDatacopyOf(SiteVisitor.LinkData instance)Creates an immutable copy of aSiteVisitor.LinkDatavalue.booleanequals(Object another)This instance is equal to all instances ofImmutableLinkDatathat have equal attribute values.BooleangetGlobal()StringgetId()StringgetLocale()StringgetName()StringgetPath()StringgetType()StringgetValue()BooleangetWorkflow()inthashCode()Computes a hash code from attributes:id,path,name,type,value,locale,global,workflow.StringtoString()Prints the immutable valueLinkDatawith attribute values.ImmutableLinkDatawithGlobal(Boolean value)Copy the current immutable object by setting a value for theglobalattribute.ImmutableLinkDatawithId(String value)Copy the current immutable object by setting a value for theidattribute.ImmutableLinkDatawithLocale(String value)Copy the current immutable object by setting a value for thelocaleattribute.ImmutableLinkDatawithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableLinkDatawithPath(String value)Copy the current immutable object by setting a value for thepathattribute.ImmutableLinkDatawithType(String value)Copy the current immutable object by setting a value for thetypeattribute.ImmutableLinkDatawithValue(String value)Copy the current immutable object by setting a value for thevalueattribute.ImmutableLinkDatawithWorkflow(Boolean value)Copy the current immutable object by setting a value for theworkflowattribute.
-
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getIdin interfaceSiteVisitor.LinkData- Returns:
- The value of the
idattribute
-
getPath
public String getPath()
- Specified by:
getPathin interfaceSiteVisitor.LinkData- Returns:
- The value of the
pathattribute
-
getName
public String getName()
- Specified by:
getNamein interfaceSiteVisitor.LinkData- Returns:
- The value of the
nameattribute
-
getType
public String getType()
- Specified by:
getTypein interfaceSiteVisitor.LinkData- Returns:
- The value of the
typeattribute
-
getValue
public String getValue()
- Specified by:
getValuein interfaceSiteVisitor.LinkData- Returns:
- The value of the
valueattribute
-
getLocale
public String getLocale()
- Specified by:
getLocalein interfaceSiteVisitor.LinkData- Returns:
- The value of the
localeattribute
-
getGlobal
public Boolean getGlobal()
- Specified by:
getGlobalin interfaceSiteVisitor.LinkData- Returns:
- The value of the
globalattribute
-
getWorkflow
public Boolean getWorkflow()
- Specified by:
getWorkflowin interfaceSiteVisitor.LinkData- Returns:
- The value of the
workflowattribute
-
withId
public final ImmutableLinkData withId(String value)
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withPath
public final ImmutableLinkData 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
-
withName
public final ImmutableLinkData withName(String value)
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
withType
public final ImmutableLinkData withType(String value)
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy of the
thisobject
-
withValue
public final ImmutableLinkData 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
-
withLocale
public final ImmutableLinkData 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
-
withGlobal
public final ImmutableLinkData withGlobal(Boolean value)
Copy the current immutable object by setting a value for theglobalattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for global- Returns:
- A modified copy of the
thisobject
-
withWorkflow
public final ImmutableLinkData withWorkflow(Boolean value)
Copy the current immutable object by setting a value for theworkflowattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for workflow- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableLinkDatathat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,path,name,type,value,locale,global,workflow.
-
toString
public String toString()
Prints the immutable valueLinkDatawith attribute values.
-
copyOf
public static ImmutableLinkData copyOf(SiteVisitor.LinkData instance)
Creates an immutable copy of aSiteVisitor.LinkDatavalue. 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 LinkData instance
-
builder
public static ImmutableLinkData.Builder builder()
Creates a builder forImmutableLinkData.ImmutableLinkData.builder() .id(String) // requiredid.path(String) // requiredpath.name(String) // requiredname.type(String) // requiredtype.value(String) // requiredvalue.locale(String) // requiredlocale.global(Boolean) // requiredglobal.workflow(Boolean) // requiredworkflow.build();- Returns:
- A new ImmutableLinkData builder
-
-