Record Class DisplayMode
java.lang.Object
java.lang.Record
nl.colorize.multimedialib.renderer.DisplayMode
Configures the renderer's display mode, which consists of both the canvas
resolution and the targeted framerate.
-
Constructor Summary
ConstructorDescriptionDisplayMode
(Canvas canvas, int framerate) Creates an instance of aDisplayMode
record class. -
Method Summary
Modifier and TypeMethodDescriptioncanvas()
Returns the value of thecanvas
record component.final boolean
Indicates whether some other object is "equal to" this one.int
Returns the value of theframerate
record component.float
int
final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
DisplayMode
Creates an instance of aDisplayMode
record class.- Parameters:
canvas
- the value for thecanvas
record componentframerate
- the value for theframerate
record component
-
-
Method Details
-
getFrameTime
public float getFrameTime() -
getFrameTimeMS
public int getFrameTimeMS() -
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 '=='. -
canvas
Returns the value of thecanvas
record component.- Returns:
- the value of the
canvas
record component
-
framerate
public int framerate()Returns the value of theframerate
record component.- Returns:
- the value of the
framerate
record component
-