Record Class InstancerProviderImpl

java.lang.Object
java.lang.Record
com.jozufozu.flywheel.backend.engine.InstancerProviderImpl
All Implemented Interfaces:
InstancerProvider

public record InstancerProviderImpl(EngineImpl engine, RenderStage renderStage) extends Record implements InstancerProvider
  • Constructor Details

    • InstancerProviderImpl

      public InstancerProviderImpl(EngineImpl engine, RenderStage renderStage)
      Creates an instance of a InstancerProviderImpl record class.
      Parameters:
      engine - the value for the engine record component
      renderStage - the value for the renderStage record component
  • Method Details

    • instancer

      public <I extends Instance> Instancer<I> instancer(InstanceType<I> type, Model model)
      Description copied from interface: InstancerProvider
      Get an instancer for the given instance type rendering the given model.

      Calling this method twice with the same arguments in the same frame will return the same instancer.

      It is not safe to store instancers between frames. Each time you need an instancer, you should call this method.

      Specified by:
      instancer in interface InstancerProvider
      Returns:
      An instancer for the given instance type rendering the given model.
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • engine

      public EngineImpl engine()
      Returns the value of the engine record component.
      Returns:
      the value of the engine record component
    • renderStage

      public RenderStage renderStage()
      Returns the value of the renderStage record component.
      Returns:
      the value of the renderStage record component