Package dev.gothickit.zenkit.mdl
Record Class CachedModel
java.lang.Object
java.lang.Record
dev.gothickit.zenkit.mdl.CachedModel
- All Implemented Interfaces:
CacheableObject<CachedModel>,Model
public record CachedModel(@Nullable ModelHierarchy hierarchy, @Nullable ModelMesh mesh)
extends Record
implements Model
-
Constructor Summary
ConstructorsConstructorDescriptionCachedModel(@Nullable ModelHierarchy hierarchy, @Nullable ModelMesh mesh) Creates an instance of aCachedModelrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull CachedModelcache()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable ModelHierarchyReturns the value of thehierarchyrecord component.booleanisCached()@Nullable ModelMeshmesh()Returns the value of themeshrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CachedModel
public CachedModel(@Nullable @Nullable ModelHierarchy hierarchy, @Nullable @Nullable ModelMesh mesh) Creates an instance of aCachedModelrecord class.- Parameters:
hierarchy- the value for thehierarchyrecord componentmesh- the value for themeshrecord component
-
-
Method Details
-
cache
- Specified by:
cachein interfaceCacheableObject<CachedModel>
-
isCached
public boolean isCached()- Specified by:
isCachedin interfaceCacheableObject<CachedModel>
-
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). -
hierarchy
Returns the value of thehierarchyrecord component. -
mesh
Returns the value of themeshrecord component.
-