Package org.ametys.web.skin
Record Class ImageCropPreviewsComponent.ImageCropPreview
java.lang.Object
java.lang.Record
org.ametys.web.skin.ImageCropPreviewsComponent.ImageCropPreview
- Record Components:
width- the crop widthheight- the crop heightlabel- the crop label. Can be null.includedContentTypes- the content types for which this crop preview should be included. If null, it is included for all content typesexcludedContentTypes- the content types for which this crop preview should be excluded. If null, it is not excluded for any content type
- Enclosing class:
ImageCropPreviewsComponent
public static record ImageCropPreviewsComponent.ImageCropPreview(int width, int height, I18nizableText label, Set<String> includedContentTypes, Set<String> excludedContentTypes)
extends Record
Represents a preview for an image crop, with its dimensions, label and content types conditions
-
Constructor Summary
ConstructorsConstructorDescriptionImageCropPreview(int width, int height, I18nizableText label, Set<String> includedContentTypes, Set<String> excludedContentTypes) Creates an instance of aImageCropPreviewrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theexcludedContentTypesrecord component.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.Returns the value of theincludedContentTypesrecord component.label()Returns the value of thelabelrecord component.toJson()Returns the json representation of a crop image previewfinal StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
ImageCropPreview
public ImageCropPreview(int width, int height, I18nizableText label, Set<String> includedContentTypes, Set<String> excludedContentTypes) Creates an instance of aImageCropPreviewrecord class.- Parameters:
width- the value for thewidthrecord componentheight- the value for theheightrecord componentlabel- the value for thelabelrecord componentincludedContentTypes- the value for theincludedContentTypesrecord componentexcludedContentTypes- the value for theexcludedContentTypesrecord component
-
-
Method Details
-
toJson
Returns the json representation of a crop image preview- Returns:
- the json representation
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
width
Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
includedContentTypes
Returns the value of theincludedContentTypesrecord component.- Returns:
- the value of the
includedContentTypesrecord component
-
excludedContentTypes
Returns the value of theexcludedContentTypesrecord component.- Returns:
- the value of the
excludedContentTypesrecord component
-