Record Class CachedModelAnimation

java.lang.Object
java.lang.Record
dev.gothickit.zenkit.ani.CachedModelAnimation
All Implemented Interfaces:
ModelAnimation, CacheableObject<CachedModelAnimation>

public record CachedModelAnimation(@NotNull String name, @NotNull String next, int layer, int frameCount, int nodeCount, float fps, float fpsSource, @NotNull AxisAlignedBoundingBox bbox, long checksum, @NotNull String sourcePath, @NotNull Calendar sourceDate, @NotNull String sourceScript, @NotNull List<@NotNull AnimationSample> samples, int @NotNull [] nodeIndices) extends Record implements ModelAnimation
  • Constructor Summary

    Constructors
    Constructor
    Description
    CachedModelAnimation(@NotNull String name, @NotNull String next, int layer, int frameCount, int nodeCount, float fps, float fpsSource, @NotNull AxisAlignedBoundingBox bbox, long checksum, @NotNull String sourcePath, @NotNull Calendar sourceDate, @NotNull String sourceScript, @NotNull List<@NotNull AnimationSample> samples, int @NotNull [] nodeIndices)
    Creates an instance of a CachedModelAnimation record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the bbox record component.
     
    long
    Returns the value of the checksum record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    float
    fps()
    Returns the value of the fps record component.
    float
    Returns the value of the fpsSource record component.
    int
    Returns the value of the frameCount record component.
    final int
    Returns a hash code value for this object.
    boolean
     
    int
    Returns the value of the layer record component.
    @NotNull String
    Returns the value of the name record component.
    @NotNull String
    Returns the value of the next record component.
    int
    Returns the value of the nodeCount record component.
    int @NotNull []
    Returns the value of the nodeIndices record component.
    @Nullable AnimationSample
    sample(long i)
     
    long
     
    @NotNull List<@NotNull AnimationSample>
    Returns the value of the samples record component.
    @NotNull Calendar
    Returns the value of the sourceDate record component.
    @NotNull String
    Returns the value of the sourcePath record component.
    @NotNull String
    Returns the value of the sourceScript record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CachedModelAnimation

      public CachedModelAnimation(@NotNull @NotNull String name, @NotNull @NotNull String next, int layer, int frameCount, int nodeCount, float fps, float fpsSource, @NotNull @NotNull AxisAlignedBoundingBox bbox, long checksum, @NotNull @NotNull String sourcePath, @NotNull @NotNull Calendar sourceDate, @NotNull @NotNull String sourceScript, @NotNull @NotNull List<@NotNull AnimationSample> samples, int @NotNull [] nodeIndices)
      Creates an instance of a CachedModelAnimation record class.
      Parameters:
      name - the value for the name record component
      next - the value for the next record component
      layer - the value for the layer record component
      frameCount - the value for the frameCount record component
      nodeCount - the value for the nodeCount record component
      fps - the value for the fps record component
      fpsSource - the value for the fpsSource record component
      bbox - the value for the bbox record component
      checksum - the value for the checksum record component
      sourcePath - the value for the sourcePath record component
      sourceDate - the value for the sourceDate record component
      sourceScript - the value for the sourceScript record component
      samples - the value for the samples record component
      nodeIndices - the value for the nodeIndices record component
  • Method Details

    • sampleCount

      public long sampleCount()
      Specified by:
      sampleCount in interface ModelAnimation
    • sample

      @Nullable public @Nullable AnimationSample sample(long i)
      Specified by:
      sample in interface ModelAnimation
    • cache

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

      public boolean isCached()
      Specified by:
      isCached in interface CacheableObject<CachedModelAnimation>
    • 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.
    • name

      @NotNull public @NotNull String name()
      Returns the value of the name record component.
      Specified by:
      name in interface ModelAnimation
      Returns:
      the value of the name record component
    • next

      @NotNull public @NotNull String next()
      Returns the value of the next record component.
      Specified by:
      next in interface ModelAnimation
      Returns:
      the value of the next record component
    • layer

      public int layer()
      Returns the value of the layer record component.
      Specified by:
      layer in interface ModelAnimation
      Returns:
      the value of the layer record component
    • frameCount

      public int frameCount()
      Returns the value of the frameCount record component.
      Specified by:
      frameCount in interface ModelAnimation
      Returns:
      the value of the frameCount record component
    • nodeCount

      public int nodeCount()
      Returns the value of the nodeCount record component.
      Specified by:
      nodeCount in interface ModelAnimation
      Returns:
      the value of the nodeCount record component
    • fps

      public float fps()
      Returns the value of the fps record component.
      Specified by:
      fps in interface ModelAnimation
      Returns:
      the value of the fps record component
    • fpsSource

      public float fpsSource()
      Returns the value of the fpsSource record component.
      Specified by:
      fpsSource in interface ModelAnimation
      Returns:
      the value of the fpsSource record component
    • bbox

      @NotNull public @NotNull AxisAlignedBoundingBox bbox()
      Returns the value of the bbox record component.
      Specified by:
      bbox in interface ModelAnimation
      Returns:
      the value of the bbox record component
    • checksum

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

      @NotNull public @NotNull String sourcePath()
      Returns the value of the sourcePath record component.
      Specified by:
      sourcePath in interface ModelAnimation
      Returns:
      the value of the sourcePath record component
    • sourceDate

      @NotNull public @NotNull Calendar sourceDate()
      Returns the value of the sourceDate record component.
      Specified by:
      sourceDate in interface ModelAnimation
      Returns:
      the value of the sourceDate record component
    • sourceScript

      @NotNull public @NotNull String sourceScript()
      Returns the value of the sourceScript record component.
      Specified by:
      sourceScript in interface ModelAnimation
      Returns:
      the value of the sourceScript record component
    • samples

      @NotNull public @NotNull List<@NotNull AnimationSample> samples()
      Returns the value of the samples record component.
      Specified by:
      samples in interface ModelAnimation
      Returns:
      the value of the samples record component
    • nodeIndices

      public int @NotNull [] nodeIndices()
      Returns the value of the nodeIndices record component.
      Specified by:
      nodeIndices in interface ModelAnimation
      Returns:
      the value of the nodeIndices record component