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
ConstructorsConstructorDescriptionLoadedContent(MimeType originalMimeType, InternalType data) Creates an instance of aLoadedContentrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theoriginalMimeTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LoadedContent
Creates an instance of aLoadedContentrecord class.- Parameters:
originalMimeType- the value for theoriginalMimeTyperecord componentdata- the value for thedatarecord 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 theoriginalMimeTyperecord component.- Returns:
- the value of the
originalMimeTyperecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-