Package com.io7m.cardant.model
Interface CAFileType
- All Superinterfaces:
Comparable<CAFileType>
- All Known Implementing Classes:
CAFileType.CAFileWithData,CAFileType.CAFileWithoutData
public sealed interface CAFileType
extends Comparable<CAFileType>
permits CAFileType.CAFileWithoutData, CAFileType.CAFileWithData
The type of files.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA file with data.static final recordA file without data. -
Method Summary
-
Method Details
-
id
CAFileID id()- Returns:
- The ID
-
description
String description()- Returns:
- The description
-
mediaType
String mediaType()- Returns:
- The media type
-
size
long size()- Returns:
- The size in bytes
-
hashAlgorithm
String hashAlgorithm()- Returns:
- The hash algorithm
-
hashValue
String hashValue()- Returns:
- The hash value
-
dataOptional
Optional<CAByteArray> dataOptional()- Returns:
- The data, if any
-
withoutData
CAFileType.CAFileWithoutData withoutData()- Returns:
- The file without data
-
compareTo
- Specified by:
compareToin interfaceComparable<CAFileType>
-