Package rife.cmf.loader
Record Class LoadedContent<InternalType>
java.lang.Object
java.lang.Record
rife.cmf.loader.LoadedContent<InternalType>
public record LoadedContent<InternalType>(MimeType originalMimeType, InternalType data)
extends Record
This holds the content that was loaded by a content loader backend and
also tracks the original mime type of the provided data. When the original
mime-type was not null, the provided data was in a mime-type that the
content management framework natively supports. This can be used to
prevent needless content conversion, which can be beneficial in the case
of lossy formats.
- Since:
- 1.4
- See Also:
-
Constructor Summary
ConstructorDescriptionLoadedContent
(MimeType originalMimeType, InternalType data) Creates an instance of aLoadedContent
record class. -
Method Summary
Modifier and TypeMethodDescriptiondata()
Returns the value of thedata
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theoriginalMimeType
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
LoadedContent
Creates an instance of aLoadedContent
record class.- Parameters:
originalMimeType
- the value for theoriginalMimeType
record componentdata
- the value for thedata
record component
-
-
Method Details
-
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)
. -
originalMimeType
Returns the value of theoriginalMimeType
record component.- Returns:
- the value of the
originalMimeType
record component
-
data
Returns the value of thedata
record component.- Returns:
- the value of the
data
record component
-