Record Class ContainerImageMetadata
java.lang.Object
java.lang.Record
org.springframework.boot.autoconfigure.container.ContainerImageMetadata
- Record Components:
imageName- the container image name ornullif the image name is not yet known
Metadata about a container image that can be added to an
AttributeAccessor.
Primarily designed to be attached to BeanDefinitions created in
support of Testcontainers or Docker Compose.- Since:
- 3.4.0
- Author:
- Phillip Webb
-
Constructor Summary
ConstructorsConstructorDescriptionContainerImageMetadata(@Nullable String imageName) Creates an instance of aContainerImageMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTo(@Nullable AttributeAccessor attributes) Add this container image metadata to the given attributes.final booleanIndicates whether some other object is "equal to" this one.static @Nullable ContainerImageMetadatagetFrom(@Nullable AttributeAccessor attributes) ReturnContainerImageMetadatafrom the given attributes ornullif no metadata has been added.final inthashCode()Returns a hash code value for this object.@Nullable StringReturns the value of theimageNamerecord component.static booleanisPresent(@Nullable AttributeAccessor attributes) ReturntrueifContainerImageMetadatahas been added to the given attributes.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ContainerImageMetadata
-
-
Method Details
-
addTo
Add this container image metadata to the given attributes.- Parameters:
attributes- the attributes to add the metadata to
-
isPresent
ReturntrueifContainerImageMetadatahas been added to the given attributes.- Parameters:
attributes- the attributes to check- Returns:
- if metadata is present
-
getFrom
ReturnContainerImageMetadatafrom the given attributes ornullif no metadata has been added.- Parameters:
attributes- the attributes- Returns:
- the metadata or
null
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
imageName
-