Class ResponsiveImageAttributes
-
- All Implemented Interfaces:
public final class ResponsiveImageAttributesResulting set of attributes suitable for an HTML
<img>element. Useful for enabling responsive image loading withsrcSetandsizes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classResponsiveImageAttributes.BuilderA builder for ResponsiveImageAttributes.
-
Method Summary
Modifier and Type Method Description final Stringsrc()URL for the largest candidate (assigned to plain src).final Optional<String>sizes()sizesreturned (or synthesised as100vw).final Optional<String>srcSet()Candidate set with worxdescriptors.final Optional<Double>width()Width as a number (if widthwas provided in the input options).final JsonField<String>_src()Returns the raw JSON value of src. final JsonField<String>_sizes()Returns the raw JSON value of sizes. final JsonField<String>_srcSet()Returns the raw JSON value of srcSet. final JsonField<Double>_width()Returns the raw JSON value of width. final Map<String, JsonValue>_additionalProperties()final ResponsiveImageAttributes.BuildertoBuilder()final ResponsiveImageAttributesvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ResponsiveImageAttributes.Builderbuilder()Returns a mutable builder for constructing an instance of ResponsiveImageAttributes. -
-
Method Detail
-
sizes
final Optional<String> sizes()
sizesreturned (or synthesised as100vw). The value for the HTMLsizesattribute.
-
srcSet
final Optional<String> srcSet()
Candidate set with
worxdescriptors. Multiple image URLs separated by commas, each with a descriptor.
-
width
final Optional<Double> width()
Width as a number (if
widthwas provided in the input options).
-
_src
final JsonField<String> _src()
Returns the raw JSON value of src.
Unlike src, this method doesn't throw if the JSON field has an unexpected type.
-
_sizes
final JsonField<String> _sizes()
Returns the raw JSON value of sizes.
Unlike sizes, this method doesn't throw if the JSON field has an unexpected type.
-
_srcSet
final JsonField<String> _srcSet()
Returns the raw JSON value of srcSet.
Unlike srcSet, this method doesn't throw if the JSON field has an unexpected type.
-
_width
final JsonField<Double> _width()
Returns the raw JSON value of width.
Unlike width, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ResponsiveImageAttributes.Builder toBuilder()
-
validate
final ResponsiveImageAttributes validate()
-
builder
final static ResponsiveImageAttributes.Builder builder()
Returns a mutable builder for constructing an instance of ResponsiveImageAttributes.
The following fields are required:
.src()
-
-
-
-