Package com.usatiuk.dhfsfs.objects
Record Class FileDto
java.lang.Object
java.lang.Record
com.usatiuk.dhfsfs.objects.FileDto
- Record Components:
file- the filechunks- the list of chunks, each represented as a pair of a long and a JObjectKey
- All Implemented Interfaces:
JDataRemoteDto,Serializable
public record FileDto(File file, List<org.apache.commons.lang3.tuple.Pair<Long,JObjectKey>> chunks)
extends Record
implements JDataRemoteDto
FileDto is a data transfer object that contains a file and its chunks.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFileDto(File file, List<org.apache.commons.lang3.tuple.Pair<Long, JObjectKey>> chunks) Creates an instance of aFileDtorecord class. -
Method Summary
Modifier and TypeMethodDescriptionList<org.apache.commons.lang3.tuple.Pair<Long, JObjectKey>> chunks()Returns the value of thechunksrecord component.final 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.Class<? extends JDataRemote> objClass()Returns the class of the remote object that this DTO represents.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
objClass
Description copied from interface:JDataRemoteDtoReturns the class of the remote object that this DTO represents.- Specified by:
objClassin interfaceJDataRemoteDto- Returns:
- the class of the remote object that this DTO represents
-
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). -
file
Returns the value of thefilerecord component.- Returns:
- the value of the
filerecord component
-
chunks
Returns the value of thechunksrecord component.- Returns:
- the value of the
chunksrecord component
-