Record Class CachedModelMesh

java.lang.Object
java.lang.Record
dev.gothickit.zenkit.mdm.CachedModelMesh
All Implemented Interfaces:
CacheableObject<CachedModelMesh>, ModelMesh

public record CachedModelMesh(@NotNull List<@NotNull SoftSkinMesh> meshes, @NotNull Map<@NotNull String,@NotNull MultiResolutionMesh> attachments, long checksum) extends Record implements ModelMesh
  • Constructor Details

    • CachedModelMesh

      public CachedModelMesh(@NotNull @NotNull List<@NotNull SoftSkinMesh> meshes, @NotNull @NotNull Map<@NotNull String,@NotNull MultiResolutionMesh> attachments, long checksum)
      Creates an instance of a CachedModelMesh record class.
      Parameters:
      meshes - the value for the meshes record component
      attachments - the value for the attachments record component
      checksum - the value for the checksum record component
  • Method Details

    • meshCount

      public long meshCount()
      Specified by:
      meshCount in interface ModelMesh
    • mesh

      @Nullable public @Nullable SoftSkinMesh mesh(long i)
      Specified by:
      mesh in interface ModelMesh
    • attachmentCount

      public long attachmentCount()
      Specified by:
      attachmentCount in interface ModelMesh
    • attachment

      @Nullable public @Nullable MultiResolutionMesh attachment(String name)
      Specified by:
      attachment in interface ModelMesh
    • cache

      @NotNull public @NotNull CachedModelMesh cache()
      Specified by:
      cache in interface CacheableObject<CachedModelMesh>
    • isCached

      public boolean isCached()
      Specified by:
      isCached in interface CacheableObject<CachedModelMesh>
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • meshes

      @NotNull public @NotNull List<@NotNull SoftSkinMesh> meshes()
      Returns the value of the meshes record component.
      Specified by:
      meshes in interface ModelMesh
      Returns:
      the value of the meshes record component
    • attachments

      @NotNull public @NotNull Map<@NotNull String,@NotNull MultiResolutionMesh> attachments()
      Returns the value of the attachments record component.
      Specified by:
      attachments in interface ModelMesh
      Returns:
      the value of the attachments record component
    • checksum

      public long checksum()
      Returns the value of the checksum record component.
      Specified by:
      checksum in interface ModelMesh
      Returns:
      the value of the checksum record component