Package io.thestencil.client.api
Class ImmutableImageTag
- java.lang.Object
-
- io.thestencil.client.api.ImmutableImageTag
-
- All Implemented Interfaces:
Markdowns.ImageTag
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableImageTag extends Object implements Markdowns.ImageTag
Immutable implementation ofMarkdowns.ImageTag.Use the builder to create immutable instances:
ImmutableImageTag.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableImageTag.BuilderBuilds instances of typeImmutableImageTag.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableImageTag.Builderbuilder()Creates a builder forImmutableImageTag.static ImmutableImageTagcopyOf(Markdowns.ImageTag instance)Creates an immutable copy of aMarkdowns.ImageTagvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableImageTagthat have equal attribute values.StringgetAltText()IntegergetLine()StringgetPath()StringgetTitle()inthashCode()Computes a hash code from attributes:line,title,altText,path.StringtoString()Prints the immutable valueImageTagwith attribute values.ImmutableImageTagwithAltText(String value)Copy the current immutable object by setting a value for thealtTextattribute.ImmutableImageTagwithLine(Integer value)Copy the current immutable object by setting a value for thelineattribute.ImmutableImageTagwithPath(String value)Copy the current immutable object by setting a value for thepathattribute.ImmutableImageTagwithTitle(String value)Copy the current immutable object by setting a value for thetitleattribute.
-
-
-
Method Detail
-
getLine
public Integer getLine()
- Specified by:
getLinein interfaceMarkdowns.ImageTag- Returns:
- The value of the
lineattribute
-
getTitle
public String getTitle()
- Specified by:
getTitlein interfaceMarkdowns.ImageTag- Returns:
- The value of the
titleattribute
-
getAltText
public String getAltText()
- Specified by:
getAltTextin interfaceMarkdowns.ImageTag- Returns:
- The value of the
altTextattribute
-
getPath
public String getPath()
- Specified by:
getPathin interfaceMarkdowns.ImageTag- Returns:
- The value of the
pathattribute
-
withLine
public final ImmutableImageTag withLine(Integer value)
Copy the current immutable object by setting a value for thelineattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for line- Returns:
- A modified copy of the
thisobject
-
withTitle
public final ImmutableImageTag withTitle(String value)
Copy the current immutable object by setting a value for thetitleattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for title- Returns:
- A modified copy of the
thisobject
-
withAltText
public final ImmutableImageTag withAltText(String value)
Copy the current immutable object by setting a value for thealtTextattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for altText- Returns:
- A modified copy of the
thisobject
-
withPath
public final ImmutableImageTag 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
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableImageTagthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:line,title,altText,path.
-
toString
public String toString()
Prints the immutable valueImageTagwith attribute values.
-
copyOf
public static ImmutableImageTag copyOf(Markdowns.ImageTag instance)
Creates an immutable copy of aMarkdowns.ImageTagvalue. 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 ImageTag instance
-
builder
public static ImmutableImageTag.Builder builder()
Creates a builder forImmutableImageTag.ImmutableImageTag.builder() .line(Integer) // requiredline.title(String) // requiredtitle.altText(String) // requiredaltText.path(String) // requiredpath.build();- Returns:
- A new ImmutableImageTag builder
-
-