Class ImmutableImageData
- java.lang.Object
-
- io.thestencil.client.spi.staticontent.visitors.ImmutableImageData
-
- All Implemented Interfaces:
SiteVisitor.ImageData
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableImageData extends Object implements SiteVisitor.ImageData
Immutable implementation ofSiteVisitor.ImageData.Use the builder to create immutable instances:
ImmutableImageData.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableImageData.BuilderBuilds instances of typeImmutableImageData.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableImageData.Builderbuilder()Creates a builder forImmutableImageData.static ImmutableImageDatacopyOf(SiteVisitor.ImageData instance)Creates an immutable copy of aSiteVisitor.ImageDatavalue.booleanequals(Object another)This instance is equal to all instances ofImmutableImageDatathat have equal attribute values.StringgetPath()byte[]getValue()inthashCode()Computes a hash code from attributes:path,value.StringtoString()Prints the immutable valueImageDatawith attribute values.ImmutableImageDatawithPath(String value)Copy the current immutable object by setting a value for thepathattribute.ImmutableImageDatawithValue(byte... elements)Copy the current immutable object with elements that replace the content ofvalue.
-
-
-
Method Detail
-
getPath
public String getPath()
- Specified by:
getPathin interfaceSiteVisitor.ImageData- Returns:
- The value of the
pathattribute
-
getValue
public byte[] getValue()
- Specified by:
getValuein interfaceSiteVisitor.ImageData- Returns:
- A cloned
valuearray
-
withPath
public final ImmutableImageData 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
-
withValue
public final ImmutableImageData withValue(byte... elements)
Copy the current immutable object with elements that replace the content ofvalue. The array is cloned before being saved as attribute values.- Parameters:
elements- The non-null elements for value- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableImageDatathat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:path,value.
-
toString
public String toString()
Prints the immutable valueImageDatawith attribute values.
-
copyOf
public static ImmutableImageData copyOf(SiteVisitor.ImageData instance)
Creates an immutable copy of aSiteVisitor.ImageDatavalue. 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 ImageData instance
-
builder
public static ImmutableImageData.Builder builder()
Creates a builder forImmutableImageData.ImmutableImageData.builder() .path(String) // requiredpath.value(byte) // requiredvalue.build();- Returns:
- A new ImmutableImageData builder
-
-