Class Size
- java.lang.Object
-
- com.google.android.exoplayer2.util.Size
-
@Deprecated public final class Size extends Object
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.Immutable class for describing width and height dimensions in pixels.
-
-
Constructor Summary
Constructors Constructor Description Size(int width, int height)
Deprecated.Creates a new immutable Size instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object obj)
Deprecated.int
getHeight()
Deprecated.Returns the height of the size (in pixels), orC.LENGTH_UNSET
if unknown.int
getWidth()
Deprecated.Returns the width of the size (in pixels), orC.LENGTH_UNSET
if unknown.int
hashCode()
Deprecated.String
toString()
Deprecated.
-
-
-
Constructor Detail
-
Size
public Size(int width, int height)
Deprecated.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()
Deprecated.Returns the width of the size (in pixels), orC.LENGTH_UNSET
if unknown.
-
getHeight
public int getHeight()
Deprecated.Returns the height of the size (in pixels), orC.LENGTH_UNSET
if unknown.
-
-