com.jogamp.newt

## Class MonitorMode.SizeAndRRate

- java.lang.Object
- - com.jogamp.newt.MonitorMode.SizeAndRRate

- All Implemented Interfaces:
    Comparable<MonitorMode.SizeAndRRate>
  Enclosing class:
    MonitorMode

      public static class MonitorMode.SizeAndRRate
      extends Object
      implements Comparable<MonitorMode.SizeAndRRate>

  Immutable surfaceSize, flags and refreshRate Class, consisting of it's read only components:
  - nativeId
  - `SurfaceSize` surface memory size
  - `flags`
  - `refresh rate`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `flags` Mode bitfield flags, i.e.
    `int` | `hashCode`
    `float` | `refreshRate` Vertical refresh rate
    `SurfaceSize` | `surfaceSize` Non rotated surface size in pixel units

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MonitorMode.SizeAndRRate(SurfaceSize surfaceSize, float refreshRate, int flags)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(MonitorMode.SizeAndRRate sszr)` Compares `surfaceSize` 1st, then `flags`, then `refreshRate`.
    `boolean` | `equals(Object obj)` Tests equality of two `MonitorMode.SizeAndRRate` objects by evaluating equality of it's components: `surfaceSize` `refreshRate` `flags`
    `static StringBuilder` | `flags2String(int flags)`
    `int` | `hashCode()` Returns a combined hash code of it's elements: `surfaceSize` `flags` `refreshRate`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### surfaceSize

          public final SurfaceSize surfaceSize

      Non rotated surface size in pixel units

    - #### flags

          public final int flags

      Mode bitfield flags, i.e. `MonitorMode.FLAG_DOUBLESCAN`, `MonitorMode.FLAG_INTERLACE`, ..

    - #### refreshRate

          public final float refreshRate

      Vertical refresh rate

    - #### hashCode

          public final int hashCode

  - ### Constructor Detail

    - #### MonitorMode.SizeAndRRate

          public MonitorMode.SizeAndRRate(SurfaceSize surfaceSize,
                                  float refreshRate,
                                  int flags)

  - ### Method Detail

    - #### flags2String

          public static final StringBuilder flags2String(int flags)

    - #### toString

          public final String toString()

      Overrides:
        `toString` in class `Object`

    - #### compareTo

          public int compareTo(MonitorMode.SizeAndRRate sszr)

      Compares `surfaceSize` 1st, then `flags`, then `refreshRate`.

      Flags are compared as follows:

             NONE > DOUBLESCAN > INTERLACE

      Refresh rate differences of < 0.01 are considered equal (epsilon).

      Specified by:
        `compareTo` in interface `Comparable<MonitorMode.SizeAndRRate>`

    - #### equals

          public final boolean equals(Object obj)

      Tests equality of two `MonitorMode.SizeAndRRate` objects by evaluating equality of it's components:
      - `surfaceSize`
      - `refreshRate`
      - `flags`
      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public final int hashCode()

      Returns a combined hash code of it's elements:
      - `surfaceSize`
      - `flags`
      - `refreshRate`
      Overrides:
        `hashCode` in class `Object`

Copyright 2010 JogAmp Community.