Record Class Monitor

java.lang.Object
java.lang.Record
com.mojang.blaze3d.platform.Monitor

public record Monitor(String monitorName, long monitor, List<VideoMode> videoModes, VideoMode currentMode, int x, int y) extends Record
  • Field Details

    • monitorName

      private final String monitorName
      The field for the monitorName record component.
    • monitor

      private final long monitor
      The field for the monitor record component.
    • videoModes

      private final List<VideoMode> videoModes
      The field for the videoModes record component.
    • currentMode

      private final VideoMode currentMode
      The field for the currentMode record component.
    • x

      private final int x
      The field for the x record component.
    • y

      private final int y
      The field for the y record component.
    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • HEX_FORMAT

      private static final HexFormat HEX_FORMAT
  • Constructor Details

    • Monitor

      public Monitor(String monitorName, long monitor, List<VideoMode> videoModes, VideoMode currentMode, int x, int y)
      Creates an instance of a Monitor record class.
      Parameters:
      monitorName - the value for the monitorName record component
      monitor - the value for the monitor record component
      videoModes - the value for the videoModes record component
      currentMode - the value for the currentMode record component
      x - the value for the x record component
      y - the value for the y record component
  • Method Details

    • tryCreate

      public static @Nullable Monitor tryCreate(long monitor)
    • queryMonitorName

      private static String queryMonitorName(long monitor)
    • getPreferredVidMode

      public VideoMode getPreferredVidMode(Optional<VideoMode> expectedMode)
    • indexOfMode

      public int indexOfMode(VideoMode videoMode)
    • mode

      public VideoMode mode(int mode)
    • modeCount

      public int modeCount()
    • toString

      public String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • monitorName

      public String monitorName()
      Returns the value of the monitorName record component.
      Returns:
      the value of the monitorName record component
    • monitor

      public long monitor()
      Returns the value of the monitor record component.
      Returns:
      the value of the monitor record component
    • videoModes

      public List<VideoMode> videoModes()
      Returns the value of the videoModes record component.
      Returns:
      the value of the videoModes record component
    • currentMode

      public VideoMode currentMode()
      Returns the value of the currentMode record component.
      Returns:
      the value of the currentMode record component
    • x

      public int x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • y

      public int y()
      Returns the value of the y record component.
      Returns:
      the value of the y record component