Package com.google.android.exoplayer2.util

## Class Size

- java.lang.Object
- - com.google.android.exoplayer2.util.Size

-     public final class Size
      extends Object

  Immutable class for describing width and height dimensions in pixels.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static Size` | `UNKNOWN` | A static instance to represent an unknown size value.
    `static Size` | `ZERO` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Size​(int width, int height)` | Creates a new immutable Size instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `equals​(Object obj)` |
    `int` | `getHeight()` | Returns the height of the size (in pixels), or `C.LENGTH_UNSET` if unknown.
    `int` | `getWidth()` | Returns the width of the size (in pixels), or `C.LENGTH_UNSET` if unknown.
    `int` | `hashCode()` |
    `String` | `toString()` |

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### UNKNOWN

          public static final Size UNKNOWN

      A static instance to represent an unknown size value.

    - #### ZERO

          public static final Size ZERO

  - ### Constructor Detail

    - #### Size

          public Size​(int width,
                      int height)

      Creates a new immutable Size instance.
      Parameters:
        `width` - The width of the size, in pixels, or `C.LENGTH_UNSET` if unknown.
        `height` - The height of the size, in pixels, or `C.LENGTH_UNSET` if unknown.
      Throws:
        `IllegalArgumentException` - if an invalid `width` or `height` is specified.

  - ### Method Detail

    - #### getWidth

          public int getWidth()

      Returns the width of the size (in pixels), or `C.LENGTH_UNSET` if unknown.

    - #### getHeight

          public int getHeight()

      Returns the height of the size (in pixels), or `C.LENGTH_UNSET` if unknown.

    - #### equals

          public boolean equals​(@Nullable
                                Object obj)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`