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 aFileDto
record class. -
Method Summary
Modifier and TypeMethodDescriptionList
<org.apache.commons.lang3.tuple.Pair<Long, JObjectKey>> chunks()
Returns the value of thechunks
record component.final boolean
Indicates whether some other object is "equal to" this one.file()
Returns the value of thefile
record component.final int
hashCode()
Returns a hash code value for this object.Class
<? extends JDataRemote> objClass()
Returns the class of the remote object that this DTO represents.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
objClass
Description copied from interface:JDataRemoteDto
Returns the class of the remote object that this DTO represents.- Specified by:
objClass
in 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 thefile
record component.- Returns:
- the value of the
file
record component
-
chunks
Returns the value of thechunks
record component.- Returns:
- the value of the
chunks
record component
-