@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","ImageIF"}) @Immutable public final class Image extends Object implements ImageIF
ImageIF.
Use the builder to create immutable instances:
Image.builder().
Use the static factory method to create immutable instances:
Image.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
Image.Builder
Builds instances of type
Image. |
| Modifier and Type | Method and Description |
|---|---|
static Image.Builder |
builder()
Creates a builder for
Image. |
static Image |
copyOf(ImageIF instance)
Creates an immutable copy of a
ImageIF value. |
boolean |
equals(Object another)
This instance is equal to all instances of
Image that have equal attribute values. |
String |
getAltText() |
Optional<String> |
getBlockId() |
String |
getImageUrl() |
Optional<Text> |
getTitle() |
String |
getType() |
int |
hashCode()
Computes a hash code from attributes:
type, imageUrl, altText, title, blockId. |
static Image |
of(String imageUrl,
String altText)
Construct a new immutable
Image instance. |
String |
toString()
Prints the immutable value
Image with attribute values. |
Image |
withAltText(String altText)
Copy the current immutable object by setting a value for the
altText attribute. |
Image |
withBlockId(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
blockId attribute. |
Image |
withBlockId(String value)
Copy the current immutable object by setting a present value for the optional
blockId attribute. |
Image |
withImageUrl(String imageUrl)
Copy the current immutable object by setting a value for the
imageUrl attribute. |
Image |
withTitle(Optional<Text> optional)
Copy the current immutable object by setting an optional value for the
title attribute. |
Image |
withTitle(Text value)
Copy the current immutable object by setting a present value for the optional
title attribute. |
public String getType()
public String getImageUrl()
getImageUrl in interface ImageIFimageUrl attributepublic String getAltText()
getAltText in interface ImageIFaltText attributepublic Optional<String> getBlockId()
getBlockId in interface BlockblockId attributepublic final Image withImageUrl(String imageUrl)
imageUrl attribute.
An equals check used to prevent copying of the same value by returning this.imageUrl - A new value for imageUrlthis objectpublic final Image withAltText(String altText)
altText attribute.
An equals check used to prevent copying of the same value by returning this.altText - A new value for altTextthis objectpublic final Image withTitle(@Nullable Text value)
title attribute.value - The value for title, null is accepted as java.util.Optional.empty()this objectpublic final Image withTitle(Optional<Text> optional)
title attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for titlethis objectpublic final Image withBlockId(@Nullable String value)
blockId attribute.value - The value for blockId, null is accepted as java.util.Optional.empty()this objectpublic final Image withBlockId(Optional<String> optional)
blockId attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for blockIdthis objectpublic boolean equals(@Nullable Object another)
Image that have equal attribute values.public int hashCode()
type, imageUrl, altText, title, blockId.public String toString()
Image with attribute values.public static Image of(String imageUrl, String altText)
Image instance.imageUrl - The value for the imageUrl attributealtText - The value for the altText attributepublic static Image copyOf(ImageIF instance)
ImageIF value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static Image.Builder builder()
Image.Copyright © 2019. All rights reserved.