Package io.kestra.core.storages
Record Class ImmutableFileAttributes
java.lang.Object
java.lang.Record
io.kestra.core.storages.ImmutableFileAttributes
- All Implemented Interfaces:
FileAttributes
public record ImmutableFileAttributes(String fileName, long fileSize)
extends Record
implements FileAttributes
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.kestra.core.storages.FileAttributes
FileAttributes.FileType -
Constructor Summary
ConstructorsConstructorDescriptionImmutableFileAttributes(String fileName, long fileSize) Creates an instance of aImmutableFileAttributesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fileName()Returns the value of thefileNamerecord component.longfileSize()Returns the value of thefileSizerecord component.longlonglonggetSize()getType()final inthashCode()Returns a hash code value for this object.booleanfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ImmutableFileAttributes
Creates an instance of aImmutableFileAttributesrecord class.- Parameters:
fileName- the value for thefileNamerecord componentfileSize- the value for thefileSizerecord component
-
-
Method Details
-
getFileName
- Specified by:
getFileNamein interfaceFileAttributes
-
getLastModifiedTime
public long getLastModifiedTime()- Specified by:
getLastModifiedTimein interfaceFileAttributes
-
getCreationTime
public long getCreationTime()- Specified by:
getCreationTimein interfaceFileAttributes
-
getType
- Specified by:
getTypein interfaceFileAttributes
-
getSize
public long getSize()- Specified by:
getSizein interfaceFileAttributes
-
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnlyin interfaceFileAttributes
-
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 '=='. -
fileName
Returns the value of thefileNamerecord component.- Returns:
- the value of the
fileNamerecord component
-
fileSize
public long fileSize()Returns the value of thefileSizerecord component.- Returns:
- the value of the
fileSizerecord component
-