Record Class Monitor
java.lang.Object
java.lang.Record
com.mojang.blaze3d.platform.Monitor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final VideoModeThe field for thecurrentModerecord component.private static final HexFormatprivate static final org.slf4j.Loggerprivate final longThe field for themonitorrecord component.private final StringThe field for themonitorNamerecord component.The field for thevideoModesrecord component.private final intThe field for thexrecord component.private final intThe field for theyrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecurrentModerecord component.final booleanIndicates whether some other object is "equal to" this one.getPreferredVidMode(Optional<VideoMode> expectedMode) final inthashCode()Returns a hash code value for this object.intindexOfMode(VideoMode videoMode) mode(int mode) intlongmonitor()Returns the value of themonitorrecord component.Returns the value of themonitorNamerecord component.private static StringqueryMonitorName(long monitor) toString()Returns a string representation of this record class.tryCreate(long monitor) Returns the value of thevideoModesrecord component.intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.
-
Field Details
-
monitorName
The field for themonitorNamerecord component. -
monitor
private final long monitorThe field for themonitorrecord component. -
videoModes
-
currentMode
The field for thecurrentModerecord component. -
x
private final int xThe field for thexrecord component. -
y
private final int yThe field for theyrecord component. -
LOGGER
private static final org.slf4j.Logger LOGGER -
HEX_FORMAT
-
-
Constructor Details
-
Monitor
public Monitor(String monitorName, long monitor, List<VideoMode> videoModes, VideoMode currentMode, int x, int y) Creates an instance of aMonitorrecord class.- Parameters:
monitorName- the value for themonitorNamerecord componentmonitor- the value for themonitorrecord componentvideoModes- the value for thevideoModesrecord componentcurrentMode- the value for thecurrentModerecord componentx- the value for thexrecord componenty- the value for theyrecord component
-
-
Method Details
-
tryCreate
-
queryMonitorName
-
getPreferredVidMode
-
indexOfMode
-
mode
-
modeCount
public int modeCount() -
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
monitorName
Returns the value of themonitorNamerecord component.- Returns:
- the value of the
monitorNamerecord component
-
monitor
public long monitor()Returns the value of themonitorrecord component.- Returns:
- the value of the
monitorrecord component
-
videoModes
-
currentMode
Returns the value of thecurrentModerecord component.- Returns:
- the value of the
currentModerecord component
-
x
public int x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public int y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-