javax.media.nativewindow.util

## Class SurfaceSize

- java.lang.Object
- - javax.media.nativewindow.util.SurfaceSize

- All Implemented Interfaces:
    Comparable<SurfaceSize>

      public class SurfaceSize
      extends Object
      implements Comparable<SurfaceSize>

  Immutable SurfaceSize Class, consisting of it's read only components:
  - `size in pixels`
  - `bits per pixel`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SurfaceSize(DimensionImmutable resolution, int bitsPerPixel)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(SurfaceSize ssz)` Compares `resolution` 1st, if equal the bitsPerPixel.
    `boolean` | `equals(Object obj)` Checks whether two size objects are equal.
    `int` | `getBitsPerPixel()`
    `DimensionImmutable` | `getResolution()` Returns the resolution in pixel units
    `int` | `hashCode()`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### SurfaceSize

          public SurfaceSize(DimensionImmutable resolution,
                     int bitsPerPixel)

  - ### Method Detail

    - #### getResolution

          public final DimensionImmutable getResolution()

      Returns the resolution in pixel units

    - #### getBitsPerPixel

          public final int getBitsPerPixel()

    - #### toString

          public final String toString()

      Overrides:
        `toString` in class `Object`

    - #### compareTo

          public int compareTo(SurfaceSize ssz)

      Compares `resolution` 1st, if equal the bitsPerPixel.

      Specified by:
        `compareTo` in interface `Comparable<SurfaceSize>`

    - #### equals

          public final boolean equals(Object obj)

      Checks whether two size objects are equal. Two instances of `SurfaceSize` are equal if the two components `resolution` and `bitsPerPixel` are equal.
      Overrides:
        `equals` in class `Object`
      Returns:
        `true` if the two dimensions are equal; otherwise `false`.

    - #### hashCode

          public final int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright 2010 JogAmp Community.