Record Class CAClientTransferStatistics
java.lang.Object
java.lang.Record
com.io7m.cardant.client.api.CAClientTransferStatistics
- Record Components:
sizeExpected- The expected sizesizeTransferred- The amount transferred so faroctetsPerSecond- The average octets per second
public record CAClientTransferStatistics(long sizeExpected, long sizeTransferred, double octetsPerSecond)
extends Record
A snapshot of a transfer.
-
Constructor Summary
ConstructorsConstructorDescriptionCAClientTransferStatistics(long sizeExpected, long sizeTransferred, double octetsPerSecond) Creates an instance of aCAClientTransferStatisticsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theoctetsPerSecondrecord component.doublepercent()doublelongReturns the value of thesizeExpectedrecord component.longReturns the value of thesizeTransferredrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CAClientTransferStatistics
public CAClientTransferStatistics(long sizeExpected, long sizeTransferred, double octetsPerSecond) Creates an instance of aCAClientTransferStatisticsrecord class.- Parameters:
sizeExpected- the value for thesizeExpectedrecord componentsizeTransferred- the value for thesizeTransferredrecord componentoctetsPerSecond- the value for theoctetsPerSecondrecord component
-
-
Method Details
-
percentNormalized
public double percentNormalized()- Returns:
- The completion "percentage" in the range
[0, 1]
-
percent
public double percent()- Returns:
- The completion percentage in the range
[0, 100]
-
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 with thecomparemethod from their corresponding wrapper classes. -
sizeExpected
public long sizeExpected()Returns the value of thesizeExpectedrecord component.- Returns:
- the value of the
sizeExpectedrecord component
-
sizeTransferred
public long sizeTransferred()Returns the value of thesizeTransferredrecord component.- Returns:
- the value of the
sizeTransferredrecord component
-
octetsPerSecond
public double octetsPerSecond()Returns the value of theoctetsPerSecondrecord component.- Returns:
- the value of the
octetsPerSecondrecord component
-