java.lang.Object
java.lang.Record
technology.sola.engine.core.SolaConfiguration
- Record Components:
title- the title for theSola.rendererWidth- the width of theRendererrendererHeight- the height of theRenderertargetUpdatesPerSecond- the target updates per second for the game loop
@NullMarked
public record SolaConfiguration(String title, int rendererWidth, int rendererHeight, int targetUpdatesPerSecond)
extends Record
Creates a
SolaConfiguration.-
Constructor Summary
ConstructorsConstructorDescriptionSolaConfiguration(String title, int rendererWidth, int rendererHeight) Creates aSolaConfigurationwith targetUpdatePerSecond defaulted to 60.SolaConfiguration(String title, int rendererWidth, int rendererHeight, int targetUpdatesPerSecond) Creates an instance of aSolaConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of therendererHeightrecord component.intReturns the value of therendererWidthrecord component.intReturns the value of thetargetUpdatesPerSecondrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SolaConfiguration
Creates aSolaConfigurationwith targetUpdatePerSecond defaulted to 60. -
SolaConfiguration
public SolaConfiguration(String title, int rendererWidth, int rendererHeight, int targetUpdatesPerSecond) Creates an instance of aSolaConfigurationrecord class.- Parameters:
title- the value for thetitlerecord componentrendererWidth- the value for therendererWidthrecord componentrendererHeight- the value for therendererHeightrecord componenttargetUpdatesPerSecond- the value for thetargetUpdatesPerSecondrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
rendererWidth
public int rendererWidth()Returns the value of therendererWidthrecord component.- Returns:
- the value of the
rendererWidthrecord component
-
rendererHeight
public int rendererHeight()Returns the value of therendererHeightrecord component.- Returns:
- the value of the
rendererHeightrecord component
-
targetUpdatesPerSecond
public int targetUpdatesPerSecond()Returns the value of thetargetUpdatesPerSecondrecord component.- Returns:
- the value of the
targetUpdatesPerSecondrecord component
-