Package com.mojang.blaze3d.platform
Record Class DisplayData
java.lang.Object
java.lang.Record
com.mojang.blaze3d.platform.DisplayData
public record DisplayData(int width, int height, OptionalInt fullscreenWidth, OptionalInt fullscreenHeight, boolean isFullscreen)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final OptionalInt
The field for thefullscreenHeight
record component.private final OptionalInt
The field for thefullscreenWidth
record component.private final int
The field for theheight
record component.private final boolean
The field for theisFullscreen
record component.private final int
The field for thewidth
record component. -
Constructor Summary
ConstructorsConstructorDescriptionDisplayData
(int width, int height, OptionalInt fullscreenWidth, OptionalInt fullscreenHeight, boolean isFullscreen) Creates an instance of aDisplayData
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefullscreenHeight
record component.Returns the value of thefullscreenWidth
record component.final int
hashCode()
Returns a hash code value for this object.int
height()
Returns the value of theheight
record component.boolean
Returns the value of theisFullscreen
record component.final String
toString()
Returns a string representation of this record class.int
width()
Returns the value of thewidth
record component.withFullscreen
(boolean p_394284_) withSize
(int p_393987_, int p_393854_)
-
Field Details
-
width
private final int widthThe field for thewidth
record component. -
height
private final int heightThe field for theheight
record component. -
fullscreenWidth
The field for thefullscreenWidth
record component. -
fullscreenHeight
The field for thefullscreenHeight
record component. -
isFullscreen
private final boolean isFullscreenThe field for theisFullscreen
record component.
-
-
Constructor Details
-
DisplayData
public DisplayData(int width, int height, OptionalInt fullscreenWidth, OptionalInt fullscreenHeight, boolean isFullscreen) Creates an instance of aDisplayData
record class.- Parameters:
width
- the value for thewidth
record componentheight
- the value for theheight
record componentfullscreenWidth
- the value for thefullscreenWidth
record componentfullscreenHeight
- the value for thefullscreenHeight
record componentisFullscreen
- the value for theisFullscreen
record component
-
-
Method Details
-
withSize
-
withFullscreen
-
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 '=='. -
width
public int width()Returns the value of thewidth
record component.- Returns:
- the value of the
width
record component
-
height
public int height()Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-
fullscreenWidth
Returns the value of thefullscreenWidth
record component.- Returns:
- the value of the
fullscreenWidth
record component
-
fullscreenHeight
Returns the value of thefullscreenHeight
record component.- Returns:
- the value of the
fullscreenHeight
record component
-
isFullscreen
public boolean isFullscreen()Returns the value of theisFullscreen
record component.- Returns:
- the value of the
isFullscreen
record component
-