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 OptionalIntThe field for thefullscreenHeightrecord component.private final OptionalIntThe field for thefullscreenWidthrecord component.private final intThe field for theheightrecord component.private final booleanThe field for theisFullscreenrecord component.private final intThe field for thewidthrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionDisplayData(int width, int height, OptionalInt fullscreenWidth, OptionalInt fullscreenHeight, boolean isFullscreen) Creates an instance of aDisplayDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefullscreenHeightrecord component.Returns the value of thefullscreenWidthrecord component.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.booleanReturns the value of theisFullscreenrecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.withFullscreen(boolean pFullscreen) withSize(int pWidth, int pHeight)
-
Field Details
-
width
private final int widthThe field for thewidthrecord component. -
height
private final int heightThe field for theheightrecord component. -
fullscreenWidth
The field for thefullscreenWidthrecord component. -
fullscreenHeight
The field for thefullscreenHeightrecord component. -
isFullscreen
private final boolean isFullscreenThe field for theisFullscreenrecord component.
-
-
Constructor Details
-
DisplayData
public DisplayData(int width, int height, OptionalInt fullscreenWidth, OptionalInt fullscreenHeight, boolean isFullscreen) Creates an instance of aDisplayDatarecord class.- Parameters:
width- the value for thewidthrecord componentheight- the value for theheightrecord componentfullscreenWidth- the value for thefullscreenWidthrecord componentfullscreenHeight- the value for thefullscreenHeightrecord componentisFullscreen- the value for theisFullscreenrecord 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 thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
fullscreenWidth
Returns the value of thefullscreenWidthrecord component.- Returns:
- the value of the
fullscreenWidthrecord component
-
fullscreenHeight
Returns the value of thefullscreenHeightrecord component.- Returns:
- the value of the
fullscreenHeightrecord component
-
isFullscreen
public boolean isFullscreen()Returns the value of theisFullscreenrecord component.- Returns:
- the value of the
isFullscreenrecord component
-