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.
-
-
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), orC.LENGTH_UNSET
if unknown.int
getWidth()
Returns the width of the size (in pixels), orC.LENGTH_UNSET
if unknown.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
Size
public Size(int width, int height)
Creates a new immutable Size instance.- Parameters:
width
- The width of the size, in pixels, orC.LENGTH_UNSET
if unknown.height
- The height of the size, in pixels, orC.LENGTH_UNSET
if unknown.- Throws:
IllegalArgumentException
- if an invalidwidth
orheight
is specified.
-
-
Method Detail
-
getWidth
public int getWidth()
Returns the width of the size (in pixels), orC.LENGTH_UNSET
if unknown.
-
getHeight
public int getHeight()
Returns the height of the size (in pixels), orC.LENGTH_UNSET
if unknown.
-
-