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 final intThe field for thehrecord component.private static final HexFormatprivate final intThe field for theidrecord component.private static final org.slf4j.Loggerprivate final StringThe field for thenamerecord component.The field for thevideoModesrecord component.private final intThe field for thewrecord 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.getPreferredVideoMode(Optional<VideoMode> expectedMode) inth()Returns the value of thehrecord component.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.intindexOfMode(VideoMode expectedMode) mode(int mode) intname()Returns the value of thenamerecord component.private static StringqueryMonitorName(int id) toString()Returns a string representation of this record class.tryCreate(int id) Returns the value of thevideoModesrecord component.intw()Returns the value of thewrecord component.intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.
-
Field Details
-
name
The field for thenamerecord component. -
id
private final int idThe field for theidrecord 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. -
w
private final int wThe field for thewrecord component. -
h
private final int hThe field for thehrecord component. -
LOGGER
private static final org.slf4j.Logger LOGGER -
HEX_FORMAT
-
-
Constructor Details
-
Monitor
public Monitor(String name, int id, List<VideoMode> videoModes, VideoMode currentMode, int x, int y, int w, int h) Creates an instance of aMonitorrecord class.- Parameters:
name- the value for thenamerecord componentid- the value for theidrecord componentvideoModes- the value for thevideoModesrecord componentcurrentMode- the value for thecurrentModerecord componentx- the value for thexrecord componenty- the value for theyrecord componentw- the value for thewrecord componenth- the value for thehrecord component
-
-
Method Details
-
tryCreate
-
queryMonitorName
-
getPreferredVideoMode
-
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. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord 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
-
w
public int w()Returns the value of thewrecord component.- Returns:
- the value of the
wrecord component
-
h
public int h()Returns the value of thehrecord component.- Returns:
- the value of the
hrecord component
-