Package com.io7m.cardant.model
Record Class CAFileType.CAFileWithData
java.lang.Object
java.lang.Record
com.io7m.cardant.model.CAFileType.CAFileWithData
- Record Components:
id- The IDdescription- The descriptionmediaType- The media typehashAlgorithm- The hash algorithmhashValue- The hash valuedata- The data
- All Implemented Interfaces:
CAFileType,Comparable<CAFileType>
- Enclosing interface:
CAFileType
public static record CAFileType.CAFileWithData(CAFileID id, String description, String mediaType, String hashAlgorithm, String hashValue, CAByteArray data)
extends Record
implements CAFileType
A file with data.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.io7m.cardant.model.CAFileType
CAFileType.CAFileWithData, CAFileType.CAFileWithoutData -
Constructor Summary
ConstructorsConstructorDescriptionCAFileWithData(CAFileID id, String description, String mediaType, String hashAlgorithm, String hashValue, CAByteArray data) A file with data. -
Method Summary
Modifier and TypeMethodDescriptiondata()Returns the value of thedatarecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thehashAlgorithmrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thehashValuerecord component.id()Returns the value of theidrecord component.Returns the value of themediaTyperecord component.longsize()final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.cardant.model.CAFileType
compareTo
-
Constructor Details
-
Method Details
-
size
public long size()- Specified by:
sizein interfaceCAFileType- Returns:
- The size in bytes
-
dataOptional
- Specified by:
dataOptionalin interfaceCAFileType- Returns:
- The data, if any
-
withoutData
- Specified by:
withoutDatain interfaceCAFileType- Returns:
- The file without data
-
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). -
id
Returns the value of theidrecord component.- Specified by:
idin interfaceCAFileType- Returns:
- the value of the
idrecord component
-
description
Returns the value of thedescriptionrecord component.- Specified by:
descriptionin interfaceCAFileType- Returns:
- the value of the
descriptionrecord component
-
mediaType
Returns the value of themediaTyperecord component.- Specified by:
mediaTypein interfaceCAFileType- Returns:
- the value of the
mediaTyperecord component
-
hashAlgorithm
Returns the value of thehashAlgorithmrecord component.- Specified by:
hashAlgorithmin interfaceCAFileType- Returns:
- the value of the
hashAlgorithmrecord component
-
hashValue
Returns the value of thehashValuerecord component.- Specified by:
hashValuein interfaceCAFileType- Returns:
- the value of the
hashValuerecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-