java.lang.Object
java.lang.Record
technology.sola.engine.core.SolaConfiguration
- Record Components:
title
- the title for theSola
.rendererWidth
- the width of theRenderer
rendererHeight
- the height of theRenderer
targetUpdatesPerSecond
- 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 aSolaConfiguration
with targetUpdatePerSecond defaulted to 60.SolaConfiguration
(String title, int rendererWidth, int rendererHeight, int targetUpdatesPerSecond) Creates an instance of aSolaConfiguration
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of therendererHeight
record component.int
Returns the value of therendererWidth
record component.int
Returns the value of thetargetUpdatesPerSecond
record component.title()
Returns the value of thetitle
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
SolaConfiguration
Creates aSolaConfiguration
with targetUpdatePerSecond defaulted to 60. -
SolaConfiguration
public SolaConfiguration(String title, int rendererWidth, int rendererHeight, int targetUpdatesPerSecond) Creates an instance of aSolaConfiguration
record class.- Parameters:
title
- the value for thetitle
record componentrendererWidth
- the value for therendererWidth
record componentrendererHeight
- the value for therendererHeight
record componenttargetUpdatesPerSecond
- the value for thetargetUpdatesPerSecond
record 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 thetitle
record component.- Returns:
- the value of the
title
record component
-
rendererWidth
public int rendererWidth()Returns the value of therendererWidth
record component.- Returns:
- the value of the
rendererWidth
record component
-
rendererHeight
public int rendererHeight()Returns the value of therendererHeight
record component.- Returns:
- the value of the
rendererHeight
record component
-
targetUpdatesPerSecond
public int targetUpdatesPerSecond()Returns the value of thetargetUpdatesPerSecond
record component.- Returns:
- the value of the
targetUpdatesPerSecond
record component
-