Package org.apache.maven.cli.transfer
Record Class ConsoleMavenTransferListener.TransferResourceAndSize
java.lang.Object
java.lang.Record
org.apache.maven.cli.transfer.ConsoleMavenTransferListener.TransferResourceAndSize
- Enclosing class:
ConsoleMavenTransferListener
private static record ConsoleMavenTransferListener.TransferResourceAndSize(org.eclipse.aether.transfer.TransferResource resource, long transferredBytes)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.eclipse.aether.transfer.TransferResource
The field for theresource
record component.private final long
The field for thetransferredBytes
record component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
TransferResourceAndSize
(org.eclipse.aether.transfer.TransferResource resource, long transferredBytes) Creates an instance of aTransferResourceAndSize
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.org.eclipse.aether.transfer.TransferResource
resource()
Returns the value of theresource
record component.final String
toString()
Returns a string representation of this record class.long
Returns the value of thetransferredBytes
record component.
-
Field Details
-
resource
private final org.eclipse.aether.transfer.TransferResource resourceThe field for theresource
record component. -
transferredBytes
private final long transferredBytesThe field for thetransferredBytes
record component.
-
-
Constructor Details
-
TransferResourceAndSize
private TransferResourceAndSize(org.eclipse.aether.transfer.TransferResource resource, long transferredBytes) Creates an instance of aTransferResourceAndSize
record class.- Parameters:
resource
- the value for theresource
record componenttransferredBytes
- the value for thetransferredBytes
record 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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
resource
public org.eclipse.aether.transfer.TransferResource resource()Returns the value of theresource
record component.- Returns:
- the value of the
resource
record component
-
transferredBytes
public long transferredBytes()Returns the value of thetransferredBytes
record component.- Returns:
- the value of the
transferredBytes
record component
-