Package org.apache.maven.cling.transfer
Record Class TransferResourceIdentifier
java.lang.Object
java.lang.Record
org.apache.maven.cling.transfer.TransferResourceIdentifier
record TransferResourceIdentifier(String repositoryId, String repositoryUrl, String resourceName, @Nullable Path file)
extends Record
Immutable identifier of a
TransferResource.
The TransferResource is not immutable and does not implement Objects#equals and Objects#hashCode methods,
making it not very suitable for usage in collections.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PathThe field for thefilerecord component.private final StringThe field for therepositoryIdrecord component.private final StringThe field for therepositoryUrlrecord component.private final StringThe field for theresourceNamerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionTransferResourceIdentifier(String repositoryId, String repositoryUrl, String resourceName, Path file) Creates an instance of aTransferResourceIdentifierrecord class.TransferResourceIdentifier(org.eclipse.aether.transfer.TransferResource resource) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.file()Returns the value of thefilerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of therepositoryIdrecord component.Returns the value of therepositoryUrlrecord component.Returns the value of theresourceNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
repositoryId
The field for therepositoryIdrecord component. -
repositoryUrl
The field for therepositoryUrlrecord component. -
resourceName
The field for theresourceNamerecord component. -
file
The field for thefilerecord component.
-
-
Constructor Details
-
TransferResourceIdentifier
TransferResourceIdentifier(org.eclipse.aether.transfer.TransferResource resource) -
TransferResourceIdentifier
TransferResourceIdentifier(String repositoryId, String repositoryUrl, String resourceName, @Nullable Path file) Creates an instance of aTransferResourceIdentifierrecord class.- Parameters:
repositoryId- the value for therepositoryIdrecord componentrepositoryUrl- the value for therepositoryUrlrecord componentresourceName- the value for theresourceNamerecord componentfile- the value for thefilerecord component
-
-
Method Details
-
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
public final int 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. All components in this record class are compared withObjects::equals(Object,Object). -
repositoryId
Returns the value of therepositoryIdrecord component.- Returns:
- the value of the
repositoryIdrecord component
-
repositoryUrl
Returns the value of therepositoryUrlrecord component.- Returns:
- the value of the
repositoryUrlrecord component
-
resourceName
Returns the value of theresourceNamerecord component.- Returns:
- the value of the
resourceNamerecord component
-
file
Returns the value of thefilerecord component.- Returns:
- the value of the
filerecord component
-